public static PlotCanvas plot ( int [ ] x , DiscreteDistribution d ) { double [ ] lowerBound = { Math . min ( x ) , d . quantile ( 1 / ( x . length + 1.0 ) ) } ; double [ ] upperBound = { Math . max ( x ) , d . quantile ( x . length / ( x . length + 1.0 ) ) } ; PlotCanvas canvas = new PlotCanvas ( lowerBound , upperBound ) ; canvas . add ( new QQPlot ( x , d ) ) ; return canvas ; }
Create a plot canvas with the one sample Q - Q plot to given distribution . The x - axis is the quantiles of x and the y - axis is the quantiles of given distribution .