statsmodels.graphics.gofplots.qqplot_2samples(data1, data2, xlabel=None, ylabel=None, line=None, ax=None)
[source]
Q-Q Plot of two samples’ quantiles.
Can take either two ProbPlot
instances or two array-like objects. In the case of the latter, both inputs will be converted to ProbPlot
instances using only the default values - so use ProbPlot
instances if finer-grained control of the quantile computations is required.
Parameters: |
|
---|---|
Returns: |
fig – If |
Return type: |
Matplotlib figure instance |
See also
scipy.stats.probplot
>>> x = np.random.normal(loc=8.5, scale=2.5, size=37) >>> y = np.random.normal(loc=8.0, scale=3.0, size=37) >>> pp_x = sm.ProbPlot(x) >>> pp_y = sm.ProbPlot(y) >>> qqplot_2samples(pp_x, pp_y)
data1
and data2
are not ProbPlot
instances, instances will be created using the default parameters. Therefore, it is recommended to use ProbPlot
instance if fine-grained control is needed in the computation of the quantiles.
© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.graphics.gofplots.qqplot_2samples.html