Skip to content

Commit 487133c

Browse files
committed
fix minor doc typos
1 parent 801b29f commit 487133c

File tree

4 files changed

+33
-29
lines changed

4 files changed

+33
-29
lines changed

.travis.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ matrix:
2424
- ARGS="--mpl --verbose --pep8"
2525

2626
before_install:
27-
28-
# Here we just install Miniconda, which you shouldn't have to change.
29-
3027
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
3128
- chmod +x miniconda.sh
3229
- ./miniconda.sh -b -p $HOME/miniconda
@@ -35,10 +32,6 @@ before_install:
3532
- conda install --yes nomkl
3633

3734
install:
38-
39-
# We just set up a conda environment with the right Python version. This
40-
# should not need changing.
41-
4235
- conda create --yes -n test python=$TRAVIS_PYTHON_VERSION numpy matplotlib docopt requests pyyaml
4336
- source activate test
4437
- conda install --yes --channel=conda-forge pytest-mpl pytest-cov pytest-pep8 ${EXTRATESTERS}

docs/tutorial/closer_look_at_viz.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"\n",
99
"## Overview\n",
1010
"\n",
11-
"The `probscale.probplot` function lets you do a couple of things. They are:\n",
11+
"The `probscale.probplot` function let's you do a couple of things. They are:\n",
1212
"\n",
1313
" 1. Creating percentile, quantile, or probability plots.\n",
1414
" 1. Placing your probability scale either axis.\n",
@@ -200,7 +200,7 @@
200200
" scatter_kws=dict(marker='.', linestyle='none', label='Bill Amount'))\n",
201201
"\n",
202202
"fig = probscale.probplot(tips['total_bill'], ax=ax2, plottype='qq', probax='y',\n",
203-
" datascale='log', problabel='Normal Quantiles',datalabel='Total Bill (USD)',\n",
203+
" datascale='log', problabel='Normal Quantiles', datalabel='Total Bill (USD)',\n",
204204
" scatter_kws=dict(marker='.', linestyle='none', label='Bill Amount'))\n",
205205
"ax.legend(loc='upper left')\n",
206206
"fig.tight_layout()\n",

probscale/validate.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ def axes_object(ax):
2323

2424
def axis_name(axis, axname):
2525
"""
26-
Checks that an axis name is either 'x' or 'y'. Raises an error on
27-
an invalid value. Returns the lower cased verion of valid values.
26+
Checks that an axis name is in ``{'x', 'y'}``. Raises an error on
27+
an invalid value. Returns the lower case verion of valid values.
28+
2829
"""
2930

3031
valid_args = ['x', 'y']
@@ -37,9 +38,10 @@ def axis_name(axis, axname):
3738

3839
def fit_argument(arg, argname):
3940
"""
40-
Checks that an axis options is either 'x', y', 'both', or None.
41+
Checks that an axis options is in ``{'x', y', 'both', None}``.
4142
Raises an error on an invalid value. Returns the lower case verion
4243
of valid values.
44+
4345
"""
4446

4547
valid_args = ['x', 'y', 'both', None]
@@ -55,12 +57,14 @@ def fit_argument(arg, argname):
5557
def axis_type(axtype):
5658
"""
5759
Checks that a valid axis type is requested.
58-
pp - percentile axis
59-
qq - quantile axis
60-
prob - probability axis
60+
61+
- *pp* - percentile axis
62+
- *qq* - quantile axis
63+
- *prob* - probability axis
6164
6265
Raises an error on an invalid value. Returns the lower case verion
6366
of valid values.
67+
6468
"""
6569

6670
if axtype.lower() not in ['pp', 'qq', 'prob']:
@@ -71,21 +75,21 @@ def axis_type(axtype):
7175
def axis_label(label):
7276
"""
7377
Replaces None with an empty string for axis labels.
78+
7479
"""
7580

76-
if label is None:
77-
return ''
78-
else:
79-
return label
81+
return '' if label is None else label
8082

8183

8284
def other_options(options):
8385
"""
8486
Replaces None with an empty dict for plotting options.
87+
8588
"""
8689

8790
return dict() if options is None else options.copy()
8891

92+
8993
def estimator(value):
9094
if value.lower() in ['res', 'resid', 'resids', 'residual', 'residuals']:
9195
msg = 'Bootstrapping the residuals is not ready yet'

probscale/viz.py

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import copy
1+
import copy
22

33
import numpy
44
from matplotlib import pyplot
@@ -81,8 +81,9 @@ def probplot(data, ax=None, plottype='prob', dist=None, probax='x',
8181
specified within ``scatter_kws`` and ``line_kws``.
8282
8383
.. note::
84-
Users should not specify the parameter. It is inteded to only
85-
be used by seaborn when operating within a FacetGrid.
84+
Users should not specify this parameter. It is inteded to
85+
only be used by seaborn when operating within a
86+
``FacetGrid``.
8687
8788
label : string, optional
8889
A directly-specified legend label for the data series. This
@@ -91,8 +92,9 @@ def probplot(data, ax=None, plottype='prob', dist=None, probax='x',
9192
data series label should be specified within ``scatter_kws``.
9293
9394
.. note::
94-
Users should not specify the parameter. It is inteded to only
95-
be used by seaborn when operating within a FacetGrid.
95+
Users should not specify this parameter. It is inteded to
96+
only be used by seaborn when operating within a
97+
``FacetGrid``.
9698
9799
98100
Returns
@@ -415,16 +417,21 @@ def fit_line(x, y, xhat=None, fitprobs=None, fitlogs=None, dist=None,
415417
Defines how data should be transformed. Valid values are
416418
'x', 'y', or 'both'. If using ``fitprobs``, variables should
417419
be expressed as a percentage, i.e.,
418-
Probablility transform = lambda x: ``dist``.ppf(x / 100.).
419-
Log transform = lambda x: numpy.log(x).
420+
for a probablility transform, data will be transformed with
421+
``lambda x: dist.ppf(x / 100.)``.
422+
For a log transform, ``lambda x: numpy.log(x)``.
420423
Take care to not pass the same value to both ``fitlogs`` and
424+
<<<<<<< 801b29f5fb36417255ee93a7fe704cc1360cb89c
421425
``figprobs`` as both transforms will be applied.
422426
427+
=======
428+
``fitprobs`` as both transforms will be applied.
429+
>>>>>>> fix minor doc typos
423430
dist : distribution, optional
424431
A fully-spec'd scipy.stats distribution-like object
425432
such that ``dist.ppf`` and ``dist.cdf`` can be called. If not
426433
provided, defaults to a minimal implementation of
427-
scipt.stats.norm.
434+
``scipt.stats.norm``.
428435
429436
estimate_ci : bool, optional (False)
430437
Estimate and draw a confidence band around the best-fit line
@@ -463,12 +470,12 @@ def fit_line(x, y, xhat=None, fitprobs=None, fitlogs=None, dist=None,
463470

464471
# maybe compute ppf of x
465472
if fitprobs in ['x', 'both']:
466-
x = dist.ppf(x/100.)
473+
x = dist.ppf(x / 100.)
467474
xhat = dist.ppf(numpy.array(xhat)/100.)
468475

469476
# maybe compute ppf of y
470477
if fitprobs in ['y', 'both']:
471-
y = dist.ppf(y/100.)
478+
y = dist.ppf(y / 100.)
472479

473480
# maybe compute log of x
474481
if fitlogs in ['x', 'both']:

0 commit comments

Comments
 (0)