3.6.7.1.3. statsmodels.graphics.gofplots.qqline

statsmodels.graphics.gofplots.qqline(ax, line, x=None, y=None, dist=None, fmt='r-')[source]

Plot a reference line for a qqplot.

Parameters:

ax : matplotlib axes instance

The axes on which to plot the line

line : str {‘45’,’r’,’s’,’q’}

Options for the reference line to which the data is compared.:

  • ‘45’ - 45-degree line

  • ‘s’ - standardized line, the expected order statistics are scaled by

    the standard deviation of the given sample and have the mean added to them

  • ‘r’ - A regression line is fit

  • ‘q’ - A line is fit through the quartiles.

  • None - By default no reference line is added to the plot.

x : array

X data for plot. Not needed if line is ‘45’.

y : array

Y data for plot. Not needed if line is ‘45’.

dist : scipy.stats.distribution

A scipy.stats distribution, needed if line is ‘q’.

Notes

There is no return value. The line is plotted on the given ax.