Class QQPlot


public class QQPlot extends Plot
A Q-Q plot ("Q" stands for quantile) is a probability plot, a kind of graphical method for comparing two probability distributions, by plotting their quantiles against each other. In addition, Q-Q plots can be used as a graphical means of estimating parameters in a location-scale family of distributions.
  • Constructor Summary

    Constructors
    Constructor
    Description
    QQPlot(double[][] points)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    Returns the lower bound of data.
    double[]
    Returns the upper bound of data.
    static QQPlot
    of(double[] x)
    One sample Q-Q plot to standard normal distribution.
    static QQPlot
    of(double[] x, double[] y)
    Two sample Q-Q plot.
    static QQPlot
    of(double[] x, smile.stat.distribution.Distribution d)
    One sample Q-Q plot to given distribution.
    static QQPlot
    of(int[] x, int[] y)
    Two sample Q-Q plot.
    static QQPlot
    of(int[] x, smile.stat.distribution.DiscreteDistribution d)
    One sample Q-Q plot to given discrete distribution.
    void
    Draws the shape.

    Methods inherited from class smile.plot.swing.Plot

    canvas, legends, toolbar, tooltip

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • QQPlot

      public QQPlot(double[][] points)
      Constructor.
      Parameters:
      points - the points in the plot. A point (x, y) on the plot corresponds to one of the quantiles of the second distribution (y-coordinate) plotted against the same quantile of the first distribution (x-coordinate).
  • Method Details

    • paint

      public void paint(Graphics g)
      Description copied from class: Shape
      Draws the shape.
      Specified by:
      paint in class Shape
    • getLowerBound

      public double[] getLowerBound()
      Description copied from class: Plot
      Returns the lower bound of data.
      Specified by:
      getLowerBound in class Plot
    • getUpperBound

      public double[] getUpperBound()
      Description copied from class: Plot
      Returns the upper bound of data.
      Specified by:
      getUpperBound in class Plot
    • of

      public static QQPlot of(double[] x)
      One sample Q-Q plot to standard normal distribution.
    • of

      public static QQPlot of(double[] x, smile.stat.distribution.Distribution d)
      One sample Q-Q plot to given distribution.
    • of

      public static QQPlot of(int[] x, smile.stat.distribution.DiscreteDistribution d)
      One sample Q-Q plot to given discrete distribution.
    • of

      public static QQPlot of(double[] x, double[] y)
      Two sample Q-Q plot.
    • of

      public static QQPlot of(int[] x, int[] y)
      Two sample Q-Q plot.