statsmodels.graphics.gofplots.ProbPlot.ppplot

ProbPlot.ppplot(xlabel=None, ylabel=None, line=None, other=None, ax=None, **plotkwargs)[source]

Plot of the percentiles of x versus the percentiles of a distribution.

Parameters
xlabelstr or None, optional

User-provided labels for the x-axis. If None (default), other values are used depending on the status of the kwarg other.

ylabelstr or None, optional

User-provided labels for the y-axis. If None (default), other values are used depending on the status of the kwarg other.

line{None, ‘45’, ‘s’, ‘r’, q’}, optional

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.

otherProbPlot, array_like, or None, optional

If provided, ECDF(x) will be plotted against p(x) where x are sorted samples from self. ECDF is an empirical cumulative distribution function estimated from other and p(x) = 0.5/n, 1.5/n, …, (n-0.5)/n where n is the number of samples in self. If an array-object is provided, it will be turned into a ProbPlot instance default parameters. If not provided (default), self.dist(x) is be plotted against p(x).

axAxesSubplot, optional

If given, this subplot is used to plot in instead of a new figure being created.

**plotkwargs

Additional arguments to be passed to the plot command.

Returns
Figure

If ax is None, the created figure. Otherwise the figure to which ax is connected.