Skip to content

Commit 325fcbb

Browse files
authored
Merge pull request matplotlib#27279 from anntzer/d
Tweak a few docstrings.
2 parents 66b9952 + c0ce04a commit 325fcbb

File tree

4 files changed

+34
-39
lines changed

4 files changed

+34
-39
lines changed

lib/matplotlib/axes/_axes.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -3007,11 +3007,10 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
30073007
A format string defining the properties of the baseline.
30083008
30093009
orientation : {'vertical', 'horizontal'}, default: 'vertical'
3010-
If 'vertical', will produce a plot with stems oriented vertically,
3011-
If 'horizontal', the stems will be oriented horizontally.
3010+
The orientation of the stems.
30123011
30133012
bottom : float, default: 0
3014-
The y/x-position of the baseline (depending on orientation).
3013+
The y/x-position of the baseline (depending on *orientation*).
30153014
30163015
label : str, default: None
30173016
The label to use for the stems in legends.

lib/matplotlib/colors.py

+30-34
Original file line numberDiff line numberDiff line change
@@ -1245,21 +1245,19 @@ def __init__(self, vmin=None, vmax=None, clip=False):
12451245
provided, they default to the minimum and maximum values of the input,
12461246
respectively.
12471247
1248-
12491248
clip : bool, default: False
12501249
Determines the behavior for mapping values outside the range
12511250
``[vmin, vmax]``.
12521251
1253-
If *clip* is ``False``, values outside ``[vmin, vmax]`` are also transformed
1254-
linearly, leading to results outside ``[0, 1]``. For a standard use with
1255-
colormaps, this behavior is desired because colormaps mark these outside
1256-
values with specific colors for over or under.
1257-
1258-
If *clip* is ``True``, values outside ``[vmin, vmax]`` are set to 0 or 1,
1259-
depending on which boundary they're closer to. This makes these values
1260-
indistinguishable from regular boundary values and can lead to
1261-
misinterpretation of the data.
1252+
If clipping is off, values outside the range ``[vmin, vmax]`` are
1253+
also transformed, resulting in values outside ``[0, 1]``. This
1254+
behavior is usually desirable, as colormaps can mark these *under*
1255+
and *over* values with specific colors.
12621256
1257+
If clipping is on, values below *vmin* are mapped to 0 and values
1258+
above *vmax* are mapped to 1. Such values become indistinguishable
1259+
from regular boundary values, which may cause misinterpretation of
1260+
the data.
12631261
12641262
Notes
12651263
-----
@@ -1567,15 +1565,15 @@ def __init__(self, vcenter=0, halfrange=None, clip=False):
15671565
Determines the behavior for mapping values outside the range
15681566
``[vmin, vmax]``.
15691567
1570-
If clipping is off, values outside the range ``[vmin, vmax]`` are also
1571-
transformed, resulting in values outside ``[0, 1]``. For a
1572-
standard use with colormaps, this behavior is desired because colormaps
1573-
mark these outside values with specific colors for *over* or *under*.
1568+
If clipping is off, values outside the range ``[vmin, vmax]`` are
1569+
also transformed, resulting in values outside ``[0, 1]``. This
1570+
behavior is usually desirable, as colormaps can mark these *under*
1571+
and *over* values with specific colors.
15741572
1575-
If ``True`` values falling outside the range ``[vmin, vmax]``,
1576-
are mapped to 0 or 1, whichever is closer. This makes these values
1577-
indistinguishable from regular boundary values and can lead to
1578-
misinterpretation of the data.
1573+
If clipping is on, values below *vmin* are mapped to 0 and values
1574+
above *vmax* are mapped to 1. Such values become indistinguishable
1575+
from regular boundary values, which may cause misinterpretation of
1576+
the data.
15791577
15801578
Examples
15811579
--------
@@ -1852,14 +1850,13 @@ def forward(values: array-like) -> array-like
18521850
``[vmin, vmax]``.
18531851
18541852
If clipping is off, values outside the range ``[vmin, vmax]`` are also
1855-
transformed by the function, resulting in values outside ``[0, 1]``. For a
1856-
standard use with colormaps, this behavior is desired because colormaps
1857-
mark these outside values with specific colors for *over* or *under*.
1858-
1859-
If ``True`` values falling outside the range ``[vmin, vmax]``,
1860-
are mapped to 0 or 1, whichever is closer. This makes these values
1861-
indistinguishable from regular boundary values and can lead to
1862-
misinterpretation of the data.
1853+
transformed by the function, resulting in values outside ``[0, 1]``.
1854+
This behavior is usually desirable, as colormaps can mark these *under*
1855+
and *over* values with specific colors.
1856+
1857+
If clipping is on, values below *vmin* are mapped to 0 and values above
1858+
*vmax* are mapped to 1. Such values become indistinguishable from
1859+
regular boundary values, which may cause misinterpretation of the data.
18631860
"""
18641861

18651862

@@ -1957,14 +1954,13 @@ class PowerNorm(Normalize):
19571954
``[vmin, vmax]``.
19581955
19591956
If clipping is off, values outside the range ``[vmin, vmax]`` are also
1960-
transformed by the power function, resulting in values outside ``[0, 1]``. For
1961-
a standard use with colormaps, this behavior is desired because colormaps
1962-
mark these outside values with specific colors for *over* or *under*.
1963-
1964-
If ``True`` values falling outside the range ``[vmin, vmax]``,
1965-
are mapped to 0 or 1, whichever is closer. This makes these values
1966-
indistinguishable from regular boundary values and can lead to
1967-
misinterpretation of the data.
1957+
transformed by the power function, resulting in values outside ``[0, 1]``.
1958+
This behavior is usually desirable, as colormaps can mark these *under*
1959+
and *over* values with specific colors.
1960+
1961+
If clipping is on, values below *vmin* are mapped to 0 and values above
1962+
*vmax* are mapped to 1. Such values become indistinguishable from
1963+
regular boundary values, which may cause misinterpretation of the data.
19681964
19691965
Notes
19701966
-----

lib/matplotlib/legend.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def _update_bbox_to_anchor(self, loc_in_canvas):
194194
195195
edgecolor : "inherit" or color, default: :rc:`legend.edgecolor`
196196
The legend's background patch edge color.
197-
If ``"inherit"``, use take :rc:`axes.edgecolor`.
197+
If ``"inherit"``, use :rc:`axes.edgecolor`.
198198
199199
mode : {"expand", None}
200200
If *mode* is set to ``"expand"`` the legend will be horizontally

lib/matplotlib/projections/polar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def __init__(self, axis=None, use_rmin=True,
201201
Axis associated with this transform. This is used to get the
202202
minimum radial limit.
203203
use_rmin : `bool`, optional
204-
If ``True`` add the minimum radial axis limit after
204+
If ``True``, add the minimum radial axis limit after
205205
transforming from Cartesian coordinates. *axis* must also be
206206
specified for this to take effect.
207207
"""

0 commit comments

Comments
 (0)