Skip to content

Commit 29d1c8e

Browse files
committed
clean up tutorial and docstringexamples
1 parent 8221d49 commit 29d1c8e

File tree

3 files changed

+14
-28
lines changed

3 files changed

+14
-28
lines changed

docs/tutorial/closer_look_at_viz.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@
552552
"source": [
553553
".. note::\n",
554554
" The ``probplot`` function can take two additional aesthetic parameters:\n",
555-
" `color` and `label`. If provided `color` will override the marker face color\n",
555+
" `color` and `label`. If provided, `color` will override the marker face color\n",
556556
" and line color options of the `scatter_kws` and `line_kws` parameters, respectively.\n",
557557
" Similarly, the label of the scatter series will be overridden by the explicit parameter.\n",
558558
" It is not recommended that `color` and `label` are used. They exist primarily for \n",
@@ -605,7 +605,7 @@
605605
" Used for Gumble distributions.\n",
606606
" \n",
607607
"These are controlled via the `pp_kws` parameter in `probplot`\n",
608-
"and are discussed in much more detail in the next tutorial`.\n"
608+
"and are discussed in much more detail in the next tutorial.\n"
609609
]
610610
},
611611
{

probscale/probscale.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ class ProbScale(ScaleBase):
8484
8585
>>> from matplotlib import pyplot
8686
>>> import probscale
87-
>>> fig, ax = pyplot.subplots()
88-
>>> ax.set_ylim(bottom=0.2, top=99.8)
87+
>>> fig, ax = pyplot.subplots(figsize=(4, 7))
88+
>>> ax.set_ylim(bottom=0.5, top=99.5)
8989
>>> ax.set_yscale('prob')
9090
9191
"""

probscale/viz.py

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -114,20 +114,6 @@ def probplot(data, ax=None, plottype='prob', dist=None, probax='x',
114114
... line_kws=dict(linestyle='-', linewidth=2),
115115
... scatter_kws=dict(marker='s', alpha=0.5))
116116
117-
118-
119-
Quantile plot with a custom distribution
120-
121-
.. plot::
122-
:context: close-figs
123-
124-
>>> norm = stats.norm(5, 1.25)
125-
>>> fig = probplot(data, ax=ax, plottype='qq', dist=norm,
126-
... probax='x', problabel='Theoretical Quantiles',
127-
... datalabel='Observed values', bestfit=True,
128-
... line_kws=dict(linestyle=':', linewidth=2),
129-
... scatter_kws=dict(marker='^', alpha=0.5))
130-
131117
"""
132118

133119
if dist is None:
@@ -237,32 +223,32 @@ def plot_pos(data, postype=None, alpha=None, beta=None):
237223
values can also be access via the ``postype`` parameter. Available
238224
``postype`` values (alpha, beta) are:
239225
240-
"type 4" (alpha=0, beta=1)
226+
"type 4" (alpha=0, beta=1)
241227
Linear interpolation of the empirical CDF.
242-
"type 5" or "hazen" (alpha=0.5, beta=0.5)
228+
"type 5" or "hazen" (alpha=0.5, beta=0.5)
243229
Piecewise linear interpolation.
244-
"type 6" or "weibull" (alpha=0, beta=0)
230+
"type 6" or "weibull" (alpha=0, beta=0)
245231
Weibull plotting positions. Unbiased exceedance probability
246232
for all distributions. Recommended for hydrologic
247233
applications.
248-
"type 7" (alpha=1, beta=1)
234+
"type 7" (alpha=1, beta=1)
249235
The default values in R. Not recommended with probability
250236
scales as the min and max data points get plotting positions
251237
of 0 and 1, respectively, and therefore cannot be shown.
252-
"type 8" (alpha=1/3, beta=1/3)
238+
"type 8" (alpha=1/3, beta=1/3)
253239
Approximately median-unbiased.
254-
"type 9" or "blom" (alpha=0.375, beta=0.375)
240+
"type 9" or "blom" (alpha=0.375, beta=0.375)
255241
Approximately unbiased positions if the data are normally
256242
distributed.
257-
"median" (alpha=0.3175, beta=0.3175)
243+
"median" (alpha=0.3175, beta=0.3175)
258244
Median exceedance probabilities for all distributions
259245
(used in ``scipy.stats.probplot``).
260-
"apl" or "pwm" (alpha=0.35, beta=0.35)
246+
"apl" or "pwm" (alpha=0.35, beta=0.35)
261247
Used with probability-weighted moments.
262-
"cunnane" (alpha=0.4, beta=0.4)
248+
"cunnane" (alpha=0.4, beta=0.4)
263249
Nearly unbiased quantiles for normally distributed data.
264250
This is the default value.
265-
"gringorten" (alpha=0.44, beta=0.44)
251+
"gringorten" (alpha=0.44, beta=0.44)
266252
Used for Gumble distributions.
267253
268254
Parameters

0 commit comments

Comments
 (0)