SSJ
V. 2.6.

umontreal.iro.lecuyer.charts
Class QQPlot

java.lang.Object
  extended by umontreal.iro.lecuyer.charts.XYChart
      extended by umontreal.iro.lecuyer.charts.XYLineChart
          extended by umontreal.iro.lecuyer.charts.QQPlot

public class QQPlot
extends XYLineChart

This class implements QQ-plot (or quantile-quantile plot) objects that compare two probability distributions. The data is given as a list of x-coordinates (x1, x2,…, xn), and one is given a reference continuous probability distribution F(x). One first sorts the xi in ascending order, then noted x(i), and plots the points (F-1(pi), x(i)), where i = 1, 2,…, n and pi = (i - 1/2)/n, to see if the data xi comes from the reference distribution F(x). The graph of the straight line y = x is also plotted for comparison.


Constructor Summary
QQPlot(String title, String XLabel, String YLabel, ContinuousDistribution dist, double[] X)
          Constructs a new QQPlot instance using the points X.
QQPlot(String title, String XLabel, String YLabel, ContinuousDistribution dist, double[][] data, int r)
          Constructs a new QQPlot instance.
QQPlot(String title, String XLabel, String YLabel, ContinuousDistribution dist, double[] X, int numPoints)
          Similar to the constructor QQPlot(title, XLabel, YLabel, dist, X) above, except that only the first numPoints of X are plotted.
 
Method Summary
 
Methods inherited from class umontreal.iro.lecuyer.charts.XYLineChart
add, add, add, add, add, getSeriesCollection, setSeriesCollection, setTicksSynchro, toLatex, view, viewBar
 
Methods inherited from class umontreal.iro.lecuyer.charts.XYChart
disableGrid, drawVerticalLine, enableGrid, getChartMargin, getJFreeChart, getTitle, getXAxis, getYAxis, setAutoRange, setAutoRange, setAutoRange00, setChartMargin, setLatexDocFlag, setManualRange, setManualRange, setManualRange00, setprobFlag, setTitle, toLatexFile
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QQPlot

public QQPlot(String title,
              String XLabel,
              String YLabel,
              ContinuousDistribution dist,
              double[] X)
Constructs a new QQPlot instance using the points X. title is a title, XLabel is a short description of the x-axis, and YLabel a short description of the y-axis. The plot is a QQ-plot of the points (F-1(pi), x(i)), i = 1, 2,…, n, where pi = (i - 1/2)/n, xi = X[i-1], x(i) are the sorted points, and x = F-1(p) = dist.inverseF(p). The points X are not sorted.

Parameters:
title - chart title.
XLabel - Label on x-axis.
YLabel - Label on y-axis.
dist - Reference distribution
X - points.

QQPlot

public QQPlot(String title,
              String XLabel,
              String YLabel,
              ContinuousDistribution dist,
              double[] X,
              int numPoints)
Similar to the constructor QQPlot(title, XLabel, YLabel, dist, X) above, except that only the first numPoints of X are plotted.

Parameters:
title - chart title.
XLabel - Label on x-axis.
YLabel - Label on y-axis.
dist - Reference distribution
X - point set.
numPoints - number of points to plot

QQPlot

public QQPlot(String title,
              String XLabel,
              String YLabel,
              ContinuousDistribution dist,
              double[][] data,
              int r)
Constructs a new QQPlot instance. title is a title, XLabel is a short description of the x-axis, and YLabel a short description of the y-axis. The input vectors in data represents several sets of x-points. r determine the set of points to be plotted in the QQ-plot, that is, one will plot only the points data[r][i], for i = 0, 1,…,(n - 1) and a given r, where n is the number of points in set r. The points are assumed to follow the distribution dist.

Parameters:
title - chart title.
XLabel - Label on x-axis.
YLabel - Label on y-axis.
dist - Reference distribution
data - series of point sets.
r - set of points to plot

SSJ
V. 2.6.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.