Skip to content

Commit

Permalink
'Defaults to' --> 'Default is'
Browse files Browse the repository at this point in the history
  • Loading branch information
lukelbd committed Sep 16, 2019
1 parent f0d7f19 commit 72b36ea
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 84 deletions.
56 changes: 28 additions & 28 deletions proplot/axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,15 +611,15 @@ def format(self, *, title=None, top=None,
Whether to apply "a-b-c" subplot labelling based on the
``number`` attribute. If ``number`` is >26, the labels will loop
around to a, ..., z, aa, ..., zz, aaa, ..., zzz, ... God help you
if you ever need that many labels. Defaults to :rc:`abc`.
if you ever need that many labels. Default is :rc:`abc`.
abcformat : str, optional
It is a string containing the character ``a`` or ``A``, specifying
the format of a-b-c labels. ``'a'`` is the default, but e.g.
``'a.'``, ``'a)'``, or ``'A'`` might be desirable. Defaults to
``'a.'``, ``'a)'``, or ``'A'`` might be desirable. Default is
:rc:`abc.format`.
abcloc, titleloc : str, optional
They are strings indicating the location for the a-b-c label and
main title. The following locations keys are valid. Defaults to
main title. The following locations keys are valid. Default is
:rc:`abc.loc` and :rc:`title.loc`.
======================== ============================
Expand All @@ -639,15 +639,15 @@ def format(self, *, title=None, top=None,
abcborder, titleborder : bool, optional
Whether to draw a white border around titles and a-b-c labels
positioned inside the axes. This can help them stand out on top
of artists plotted inside the axes. Defaults to
of artists plotted inside the axes. Default is
:rc:`abc.border` and :rc:`title.border`
ltitle, rtitle, ultitle, uctitle, urtitle, lltitle, lctitle, lrtitle : str, optional
Axes titles in particular positions. This lets you specify multiple
"titles" for each subplots. See the `abcloc` keyword.
top : bool, optional
Whether to try to put title and a-b-c label above the top subplot
panel (if it exists), or to always put them on the main subplot.
Defaults to ``True``.
Default is ``True``.
rowlabels, colllabels : list of str, optional
Aliases for `leftlabels`, `toplabels`.
llabels, tlabels, rlabels, blabels : list of str, optional
Expand Down Expand Up @@ -901,7 +901,7 @@ def colorbar(self, *args, loc=None, pad=None,
Parameters
----------
loc : str, optional
The colorbar location. Defaults to :rc:`colorbar.loc`. The
The colorbar location. Default is :rc:`colorbar.loc`. The
following location keys are valid.
================== ==========================================================
Expand All @@ -921,17 +921,17 @@ def colorbar(self, *args, loc=None, pad=None,
pad : float or str, optional
The space between the axes edge and the colorbar. For inset
colorbars only. If float, units are inches. If string, units
are interpreted by `~proplot.utils.units`. Defaults to
are interpreted by `~proplot.utils.units`. Default is
:rc:`colorbar.pad`.
length : float or str, optional
The colorbar length. For outer colorbars, units are relative to the
axes width or height. Defaults to :rc:`colorbar.length`.
axes width or height. Default is :rc:`colorbar.length`.
For inset colorbars, if float, units are inches; if string, units
are interpreted by `~proplot.utils.units`. Defaults to
are interpreted by `~proplot.utils.units`. Default is
:rc:`colorbar.insetlength`.
width : float or str, optional
The colorbar width. If float, units are inches. If string,
units are interpreted by `~proplot.utils.units`. Defaults to
units are interpreted by `~proplot.utils.units`. Default is
:rc:`colorbar.width` or :rc:`colorbar.insetwidth`.
space : float or str, optional
The space between the colorbar and the main axes. For outer
Expand All @@ -944,10 +944,10 @@ def colorbar(self, *args, loc=None, pad=None,
frame, frameon : bool, optional
Whether to draw a frame around inset colorbars, just like
`~matplotlib.axes.Axes.legend`.
Defaults to :rc:`colorbar.frameon`.
Default is :rc:`colorbar.frameon`.
alpha, linewidth, edgecolor, facecolor : optional
Transparency, edge width, edge color, and face color for the frame
around the inset colorbar. Defaults to
around the inset colorbar. Default is
:rc:`colorbar.framealpha`, :rc:`axes.linewidth`,
:rc:`axes.edgecolor`, and :rc:`axes.facecolor`,
respectively.
Expand Down Expand Up @@ -1232,16 +1232,16 @@ def inset_axes(self, bounds, *, transform=None, zorder=5,
The transform used to interpret `bounds`. Can be a
`~matplotlib.transforms.Transform` object or a string representing the
`~matplotlib.axes.Axes.transData`, `~matplotlib.axes.Axes.transAxes`,
or `~matplotlib.figure.Figure.transFigure` transforms. Defaults to
or `~matplotlib.figure.Figure.transFigure` transforms. Default is
``'axes'``, i.e. `bounds` is in axes-relative coordinates.
zorder : float, optional
The zorder of the axes, should be greater than the zorder of
elements in the parent axes. Defaults to ``5``.
elements in the parent axes. Default is ``5``.
zoom : bool, optional
Whether to draw lines indicating the inset zoom using
`~Axes.indicate_inset_zoom`. The lines will automatically
adjust whenever the parent axes or inset axes limits are changed.
Defaults to ``True``.
Default is ``True``.
zoom_kw : dict, optional
Passed to `~Axes.indicate_inset_zoom`.
Expand Down Expand Up @@ -1335,7 +1335,7 @@ def panel_axes(self, side, **kwargs):
The axes for which we are drawing a panel.
width : float or str or list thereof, optional
The panel width. If float, units are inches. If string, units are
interpreted by `~proplot.utils.units`. Defaults to
interpreted by `~proplot.utils.units`. Default is
:rc:`subplots.panelwidth`.
space : float or str or list thereof, optional
Empty space between the main subplot and the panel. If float,
Expand Down Expand Up @@ -1783,7 +1783,7 @@ def format(self, *,
The *x* and *y* axis formatter settings. Passed to
`~proplot.axistools.Formatter`.
xrotation, yrotation : float, optional
The rotation for *x* and *y* axis tick labels. Defaults to ``0``
The rotation for *x* and *y* axis tick labels. Default is ``0``
for normal axes, :rc:`axes.formatter.timerotation` for time *x* axes.
xtickrange, ytickrange : (float, float), optional
The *x* and *y* axis data ranges within which major tick marks
Expand All @@ -1801,7 +1801,7 @@ def format(self, *,
will prevent the spines from meeting at the origin.
xcolor, ycolor : color-spec, optional
Color for the *x* and *y* axis spines, ticks, tick labels, and axis
labels. Defaults to :rc:`color`. Use e.g. ``ax.format(color='red')``
labels. Default is :rc:`color`. Use e.g. ``ax.format(color='red')``
to set for both axes.
xticklen, yticklen : float or str, optional
Tick lengths for the *x* and *y* axis. If float, units are points.
Expand All @@ -1811,7 +1811,7 @@ def format(self, *,
set for both axes.
fixticks : bool, optional
Whether to always transform the tick locators to a
`~matplotlib.ticker.FixedLocator` instance. Defaults to ``False``.
`~matplotlib.ticker.FixedLocator` instance. Default is ``False``.
If your axis ticks are doing weird things (for example, ticks
drawn outside of the axis spine), try setting this to ``True``.
patch_kw : dict-like, optional
Expand Down Expand Up @@ -2239,17 +2239,17 @@ def dualx(self, offset=0, scale=1, xscale='linear', xlabel=None, **kwargs):
----------
scale : float, optional
The constant multiple applied after scaling data with `transform`.
Defaults to ``1``.
Default is ``1``.
For example, if your *x*-axis is meters and you
want kilometers on the other side, use ``scale=1e-3``.
offset : float, optional
The constant offset added after multipyling by `scale`.
Defaults to ``0``.
Default is ``0``.
For example, if your *x*-axis is Kelvin and you want degrees
Celsius on the opposite side, use ``offset=-273.15``.
xscale : str, optional
The registered scale name used to transform data to the alternate
units. Defaults to ``'linear'``.
units. Default is ``'linear'``.
For example, if your *x*-axis is wavenumber and you want wavelength
on the opposite side, use ``xscale='inverse'``. If your *x*-axis
is height and you want pressure on the opposite side, use
Expand Down Expand Up @@ -2288,17 +2288,17 @@ def dualy(self, offset=0, scale=1, yscale='linear', ylabel=None, **kwargs):
----------
scale : float, optional
The constant multiple applied after scaling data with `transform`.
Defaults to ``1``.
Default is ``1``.
For example, if your *y*-axis is meters and you
want kilometers on the other side, use ``scale=1e-3``.
offset : float, optional
The constant offset added after multipyling by `scale`.
Defaults to ``0``.
Default is ``0``.
For example, if your *y*-axis is Kelvin and you want degrees
Celsius on the opposite side, use ``offset=-273.15``.
yscale : str, optional
The registered scale name used to transform data to the alternate
units. Defaults to ``'linear'``.
units. Default is ``'linear'``.
For example, if your *y*-axis is wavenumber and you want wavelength
on the opposite side, use ``yscale='inverse'``. If your *y*-axis
is height and you want pressure on the opposite side, use
Expand Down Expand Up @@ -2400,7 +2400,7 @@ def format(self, *args,
The zero azimuth location.
thetadir : {-1, 1, 'clockwise', 'anticlockwise', 'counterclockwise'}, optional
The positive azimuth direction. Clockwise corresponds to ``-1``
and anticlockwise corresponds to ``-1``. Defaults to ``-1``.
and anticlockwise corresponds to ``-1``. Default is ``-1``.
thetamin, thetamax : float, optional
The lower and upper azimuthal bounds in degrees. If
``thetamax != thetamin + 360``, this produces a sector plot.
Expand Down Expand Up @@ -2624,7 +2624,7 @@ def format(self, *,
The edge latitude for the circle bounding North Pole and
South Pole-centered projections. For cartopy axes only.
grid : bool, optional
Toggles meridian and parallel gridlines on and off. Defaults to
Toggles meridian and parallel gridlines on and off. Default is
:rc:`geogrid`.
lonlines, latlines : float or list of float, optional
If float, indicates the *spacing* of meridian and parallel gridlines.
Expand All @@ -2636,7 +2636,7 @@ def format(self, *,
The maximum absolute latitude for meridian gridlines. Defaults
to :rc:`geogrid.latmax`.
labels : bool, optional
Toggles meridian and parallel gridline labels on and off. Defaults to
Toggles meridian and parallel gridline labels on and off. Default is
:rc:`geogrid.labels`.
lonlabels, latlabels
Whether to label longitudes and latitudes, and on which sides
Expand Down
18 changes: 9 additions & 9 deletions proplot/axistools.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ def Scale(scale, *args, **kwargs):

def InvertedScaleFactory(scale, name=None):
"""Returns name of newly registered *inverted* version of the
`~matplotlib.scale.ScaleBase` specified by ``scale``. The scale name
defaults to ``'{scale}_inverted'``."""
`~matplotlib.scale.ScaleBase` specified by ``scale``. The default
scale name is ``'{scale}_inverted'``."""
if not isinstance(scale, str):
raise ValueError(f'Invalid scale name {scale!r}. Must be string.')
if scale in scales:
Expand Down Expand Up @@ -377,7 +377,7 @@ def __init__(self, *args,
----------
zerotrim : bool, optional
Whether to trim trailing zeros.
Defaults to :rc:`axes.formatter.zerotrim`.
Default is :rc:`axes.formatter.zerotrim`.
precision : float, optional
The maximum number of digits after the decimal point.
tickrange : (float, float), optional
Expand Down Expand Up @@ -478,9 +478,9 @@ def FracFormatter(symbol='', number=1):
Parameters
----------
symbol : str
The symbol, e.g. ``r'$\pi$'``. Defaults to ``''``.
The symbol, e.g. ``r'$\pi$'``. Default is ``''``.
number : float
The value, e.g. `numpy.pi`. Defaults to ``1``.
The value, e.g. `numpy.pi`. Default is ``1``.
"""
def f(x, pos): # must accept location argument
frac = Fraction(x/number).limit_denominator()
Expand Down Expand Up @@ -532,7 +532,7 @@ def __init__(self, axis, **kwargs):
Parameters
----------
base : float, optional
The base of the logarithm. Defaults to ``10``.
The base of the logarithm. Default is ``10``.
nonpos : {'mask', 'clip'}, optional
Non-positive values in *x* or *y* can be masked as
invalid, or clipped to a very small positive number.
Expand All @@ -558,7 +558,7 @@ def __init__(self, axis, **kwargs):
Parameters
----------
base : float, optional
The base of the logarithm. Defaults to ``10``.
The base of the logarithm. Default is ``10``.
linthresh : float, optional
Defines the range ``(-linthresh, linthresh)``, within which the plot is
linear. This avoids having the plot go to infinity around zero. Defaults
Expand Down Expand Up @@ -597,7 +597,7 @@ def PowerScaleFactory(power, inverse=False, name=None):
If ``True``, the "forward" direction performs
the inverse operation :math:`x^{1/c}`.
name : str, optional
The registered scale name. Defaults to ``'polynomial_{power}'``.
The registered scale name. Default is ``'polynomial_{power}'``.
"""
name_ = _notNone(name, f'polynomial_{power:.1e}')
class PowerScale(mscale.ScaleBase):
Expand Down Expand Up @@ -687,7 +687,7 @@ def ExpScaleFactory(base, exp, scale=1, inverse=False, name=None):
If ``True``, the "forward" direction performs
the inverse operation :math:`(\log(x) - \log(C))/(b\log(a))`.
name : str, optional
The registered scale name. Defaults to ``'power_{base}_{exp}_{scale}'``.
The registered scale name. Default is ``'power_{base}_{exp}_{scale}'``.
"""
name_ = _notNone(name, f'exp_{base:.1e}_{scale:.1e}_{exp:.1e}')
class ExpScale(mscale.ScaleBase):
Expand Down
2 changes: 1 addition & 1 deletion proplot/projs.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def Proj(name, basemap=False, **kwargs):
The projection name. For a table of valid names, see the
`~proplot.projs` documentation.
basemap : bool, optional
Whether to use the basemap or cartopy package. Defaults to ``False``.
Whether to use the basemap or cartopy package. Default is ``False``.
**kwargs
Passed to the `~mpl_toolkits.basemap.Basemap` or `cartopy.crs.Projection`
initializers.
Expand Down
22 changes: 11 additions & 11 deletions proplot/styletools.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,12 +987,12 @@ def Colormap(*args, name=None, cyclic=None, listmode='perceptual',
a `~matplotlib.colors.LinearSegmentedColormap` is generated with
`~matplotlib.colors.LinearSegmentedColormap.from_list`. If
``'listed'``, the `~matplotlib.colors.ListedColormap` is generated.
Defaults to ``'perceptual'`` when calling `Colormap` directly, and
Default is ``'perceptual'`` when calling `Colormap` directly, and
``'listed'`` when `Colormap` is called by `Cycle`.
perceptual : bool, optional
fade : float, optional
The maximum luminosity used when generating `monochrome_cmap` colormaps.
Defaults to ``100`` when calling `Colormap` directly, and ``90`` when
Default is ``100`` when calling `Colormap` directly, and ``90`` when
`Colormap` is called by `Cycle` (this prevents having pure white in
the color cycle).
Expand All @@ -1001,7 +1001,7 @@ def Colormap(*args, name=None, cyclic=None, listmode='perceptual',
cycle : str or list of color-spec, optional
The registered cycle name or a list of colors used to interpret cycle
color strings like ``'C0'`` and ``'C2'`` when generating
`monochrome_cmap` colormaps. Defaults to colors from the currently
`monochrome_cmap` colormaps. Default is colors from the currently
active property cycler.
For example, ``plot.Colormap('C0', 'C1', 'C2', cycle='538')``
Expand Down Expand Up @@ -1582,7 +1582,7 @@ def monochrome_cmap(color, fade, reverse=False, space='hsl', name='no_name', **k
space : {'hcl', 'hsl', 'hpl'}, optional
Colorspace in which the luminance is varied.
name : str, optional
Colormap name. Defaults to ``'no_name'``.
Colormap name. Default is ``'no_name'``.
Other parameters
----------------
Expand Down Expand Up @@ -1711,7 +1711,7 @@ def __init__(self, levels, norm=None, clip=False, step=1.0, extend='neither'):
step : float, optional
The intensity of the transition to out-of-bounds color, as a
faction of the *average* step between in-bounds colors.
Defaults to ``1``.
Default is ``1``.
extend : {'neither', 'both', 'min', 'max'}, optional
Which direction colors will be extended. No matter the `extend`
option, `BinNorm` ensures colors always extend through the
Expand Down Expand Up @@ -2338,13 +2338,13 @@ def show_channels(*args, N=100, rgb=True, minhue=0, width=100,
Parameters
----------
*args : colormap-spec, optional
Positional arguments are colormap names or objects. Defaults to
``rc['image.cmap']``.
Positional arguments are colormap names or objects. Default is
:rc:`image.cmap`.
N : int, optional
The number of markers to draw for each colormap.
rgb : bool, optional
Whether to also show the red, blue, and green channels in the bottom
row. Defaults to ``True``.
row. Default is ``True``.
minhue : float, optional
The minimum hue. This lets you rotate the hue plot cyclically.
width : int, optional
Expand Down Expand Up @@ -2444,7 +2444,7 @@ def show_colorspaces(luminance=None, saturation=None, hue=None):
----------
luminance : float, optional
If passed, chroma-saturation cross-sections are drawn for this luminance.
Must be between ``0` and ``100``. Defaults to ``50``.
Must be between ``0` and ``100``. Default is ``50``.
saturation : float, optional
If passed, luminance-hue cross-sections are drawn for this saturation.
Must be between ``0` and ``100``.
Expand Down Expand Up @@ -2630,7 +2630,7 @@ def show_cmaps(*args, N=256, length=4.0, width=0.2):
Parameters
----------
*args : colormap-spec, optional
Positional arguments are colormap names or objects. Defaults to
Positional arguments are colormap names or objects. Default is
all of the registered colormaps.
N : int, optional
The number of levels in each colorbar.
Expand Down Expand Up @@ -2714,7 +2714,7 @@ def show_cycles(*args, axwidth=1.5):
Parameters
----------
*args : colormap-spec, optional
Positional arguments are cycle names or objects. Defaults to
Positional arguments are cycle names or objects. Default is
all of the registered colormaps.
axwidth : str or float, optional
Average width of each subplot. If float, units are inches. If string,
Expand Down

0 comments on commit 72b36ea

Please sign in to comment.