@@ -21,10 +21,12 @@ 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
26
- 'prob': probabilty plot
26
27
- 'pp': percentile plot
27
28
- 'qq': quantile plot
29
+
28
30
dist : scipy distribution, optional
29
31
A distribtion to compute the scale's tick positions. If not
30
32
specified, a standard normal distribution will be used.
@@ -67,7 +69,8 @@ def probplot(data, ax=None, plottype='prob', dist=None, probax='x',
67
69
fig : matplotlib.Figure
68
70
The figure on which the plot was drawn.
69
71
result : dictionary of linear fit results, optional
70
- Keys are:
72
+ Keys are:
73
+
71
74
- q : array of quantiles
72
75
- x, y : arrays of data passed to function
73
76
- xhat, yhat : arrays of modeled data plotted in best-fit line
@@ -111,20 +114,6 @@ def probplot(data, ax=None, plottype='prob', dist=None, probax='x',
111
114
... line_kws=dict(linestyle='-', linewidth=2),
112
115
... scatter_kws=dict(marker='s', alpha=0.5))
113
116
114
-
115
-
116
- Quantile plot with a custom distribution
117
-
118
- .. plot::
119
- :context: close-figs
120
-
121
- >>> norm = stats.norm(5, 1.25)
122
- >>> fig = probplot(data, ax=ax, plottype='qq', dist=norm,
123
- ... probax='x', problabel='Theoretical Quantiles',
124
- ... datalabel='Observed values', bestfit=True,
125
- ... line_kws=dict(linestyle=':', linewidth=2),
126
- ... scatter_kws=dict(marker='^', alpha=0.5))
127
-
128
117
"""
129
118
130
119
if dist is None :
@@ -234,32 +223,32 @@ def plot_pos(data, postype=None, alpha=None, beta=None):
234
223
values can also be access via the ``postype`` parameter. Available
235
224
``postype`` values (alpha, beta) are:
236
225
237
- "type 4" (alpha=0, beta=1)
226
+ "type 4" (alpha=0, beta=1)
238
227
Linear interpolation of the empirical CDF.
239
- "type 5" or "hazen" (alpha=0.5, beta=0.5)
228
+ "type 5" or "hazen" (alpha=0.5, beta=0.5)
240
229
Piecewise linear interpolation.
241
- "type 6" or "weibull" (alpha=0, beta=0)
230
+ "type 6" or "weibull" (alpha=0, beta=0)
242
231
Weibull plotting positions. Unbiased exceedance probability
243
232
for all distributions. Recommended for hydrologic
244
233
applications.
245
- "type 7" (alpha=1, beta=1)
234
+ "type 7" (alpha=1, beta=1)
246
235
The default values in R. Not recommended with probability
247
236
scales as the min and max data points get plotting positions
248
237
of 0 and 1, respectively, and therefore cannot be shown.
249
- "type 8" (alpha=1/3, beta=1/3)
238
+ "type 8" (alpha=1/3, beta=1/3)
250
239
Approximately median-unbiased.
251
- "type 9" or "blom" (alpha=0.375, beta=0.375)
240
+ "type 9" or "blom" (alpha=0.375, beta=0.375)
252
241
Approximately unbiased positions if the data are normally
253
242
distributed.
254
- "median" (alpha=0.3175, beta=0.3175)
243
+ "median" (alpha=0.3175, beta=0.3175)
255
244
Median exceedance probabilities for all distributions
256
245
(used in ``scipy.stats.probplot``).
257
- "apl" or "pwm" (alpha=0.35, beta=0.35)
246
+ "apl" or "pwm" (alpha=0.35, beta=0.35)
258
247
Used with probability-weighted moments.
259
- "cunnane" (alpha=0.4, beta=0.4)
248
+ "cunnane" (alpha=0.4, beta=0.4)
260
249
Nearly unbiased quantiles for normally distributed data.
261
250
This is the default value.
262
- "gringorten" (alpha=0.44, beta=0.44)
251
+ "gringorten" (alpha=0.44, beta=0.44)
263
252
Used for Gumble distributions.
264
253
265
254
Parameters
0 commit comments