@@ -21,7 +21,7 @@ def probplot(data, ax=None, plottype='prob', dist=None, probax='x',
21
21
The Axes on which to plot. If one is not provided, a new Axes
22
22
will be created.
23
23
plottype : string (default = 'prob')
24
- Type of plot to be created. Options are:
24
+ Type of plot to be created. Options are:
25
25
- 'prob': probabilty plot
26
26
- 'pp': percentile plot
27
27
- 'qq': quantile plot
@@ -67,7 +67,7 @@ def probplot(data, ax=None, plottype='prob', dist=None, probax='x',
67
67
fig : matplotlib.Figure
68
68
The figure on which the plot was drawn.
69
69
result : dictionary of linear fit results, optional
70
- Keys are:
70
+ Keys are:
71
71
- q : array of quantiles
72
72
- x, y : arrays of data passed to function
73
73
- xhat, yhat : arrays of modeled data plotted in best-fit line
@@ -89,6 +89,8 @@ def probplot(data, ax=None, plottype='prob', dist=None, probax='x',
89
89
:context: close-figs
90
90
91
91
>>> import numpy; numpy.random.seed(0)
92
+ >>> from matplotlib import pyplot
93
+ >>> from scipy import stats
92
94
>>> from probscale.viz import probplot
93
95
>>> data = numpy.random.normal(loc=5, scale=1.25, size=37)
94
96
>>> fig = probplot(data, plottype='prob', probax='y',
@@ -116,14 +118,12 @@ def probplot(data, ax=None, plottype='prob', dist=None, probax='x',
116
118
.. plot::
117
119
:context: close-figs
118
120
119
- >>> from scipy import stats
120
121
>>> norm = stats.norm(5, 1.25)
121
- >>> fig = probplot(data, plottype='qq', probax='x ', dist=norm,
122
- ... problabel='Theoretical Quantiles',
122
+ >>> fig = probplot(data, ax=ax, plottype='qq ', dist=norm,
123
+ ... probax='x', problabel='Theoretical Quantiles',
123
124
... datalabel='Observed values', bestfit=True,
124
125
... line_kws=dict(linestyle=':', linewidth=2),
125
126
... scatter_kws=dict(marker='^', alpha=0.5))
126
- >>> fig.axes[0].set_aspect('equal')
127
127
128
128
"""
129
129
0 commit comments