@@ -1228,13 +1228,18 @@ def __init__(self, vmin=None, vmax=None, clip=False):
1228
1228
processed; i.e., ``__call__(A)`` calls ``autoscale_None(A)``.
1229
1229
1230
1230
clip : bool, default: False
1231
- If ``True`` values falling outside the range ``[vmin, vmax]``,
1232
- are mapped to 0 or 1, whichever is closer, and masked values are
1233
- set to 1. If ``False`` masked values remain masked.
1231
+ Determines the behavior for mapping values outside the range
1232
+ ``[vmin, vmax]``.
1233
+
1234
+ If clipping is off, values outside the range ``[vmin, vmax]`` are also
1235
+ transformed linearly, resulting in values outside ``[0, 1]``. For a
1236
+ standard use with colormaps, this behavior is desired because colormaps
1237
+ mark these outside values with specific colors for *over* or *under*.
1234
1238
1235
- Clipping silently defeats the purpose of setting the over and
1236
- under colors in a colormap, so it is likely to lead to
1237
- surprises; therefore the default is ``clip=False``.
1239
+ If ``True`` values falling outside the range ``[vmin, vmax]``,
1240
+ are mapped to 0 or 1, whichever is closer. This makes these values
1241
+ indistinguishable from regular boundary values and can lead to
1242
+ misinterpretation of the data.
1238
1243
1239
1244
Notes
1240
1245
-----
@@ -1330,6 +1335,8 @@ def __call__(self, value, clip=None):
1330
1335
value
1331
1336
Data to normalize.
1332
1337
clip : bool, optional
1338
+ See the description of the parameter *clip* in `.Normalize`.
1339
+
1333
1340
If ``None``, defaults to ``self.clip`` (which defaults to
1334
1341
``False``).
1335
1342
@@ -1524,9 +1531,18 @@ def __init__(self, vcenter=0, halfrange=None, clip=False):
1524
1531
Defaults to the largest absolute difference to *vcenter* for
1525
1532
the values in the dataset.
1526
1533
clip : bool, default: False
1534
+ Determines the behavior for mapping values outside the range
1535
+ ``[vmin, vmax]``.
1536
+
1537
+ If clipping is off, values outside the range ``[vmin, vmax]`` are also
1538
+ transformed, resulting in values outside ``[0, 1]``. For a
1539
+ standard use with colormaps, this behavior is desired because colormaps
1540
+ mark these outside values with specific colors for *over* or *under*.
1541
+
1527
1542
If ``True`` values falling outside the range ``[vmin, vmax]``,
1528
- are mapped to 0 or 1, whichever is closer, and masked values are
1529
- set to 1. If ``False`` masked values remain masked.
1543
+ are mapped to 0 or 1, whichever is closer. This makes these values
1544
+ indistinguishable from regular boundary values and can lead to
1545
+ misinterpretation of the data.
1530
1546
1531
1547
Examples
1532
1548
--------
@@ -1799,13 +1815,18 @@ def forward(values: array-like) -> array-like
1799
1815
processed; i.e., ``__call__(A)`` calls ``autoscale_None(A)``.
1800
1816
1801
1817
clip : bool, default: False
1802
- If ``True`` values falling outside the range ``[vmin, vmax]``,
1803
- are mapped to 0 or 1, whichever is closer, and masked values are
1804
- set to 1. If ``False`` masked values remain masked.
1818
+ Determines the behavior for mapping values outside the range
1819
+ ``[vmin, vmax]``.
1820
+
1821
+ If clipping is off, values outside the range ``[vmin, vmax]`` are also
1822
+ transformed by the function, resulting in values outside ``[0, 1]``. For a
1823
+ standard use with colormaps, this behavior is desired because colormaps
1824
+ mark these outside values with specific colors for *over* or *under*.
1805
1825
1806
- Clipping silently defeats the purpose of setting the over and
1807
- under colors in a colormap, so it is likely to lead to
1808
- surprises; therefore the default is ``clip=False``.
1826
+ If ``True`` values falling outside the range ``[vmin, vmax]``,
1827
+ are mapped to 0 or 1, whichever is closer. This makes these values
1828
+ indistinguishable from regular boundary values and can lead to
1829
+ misinterpretation of the data.
1809
1830
"""
1810
1831
1811
1832
@@ -1899,13 +1920,18 @@ class PowerNorm(Normalize):
1899
1920
minimum and maximum value, respectively, of the first input
1900
1921
processed; i.e., ``__call__(A)`` calls ``autoscale_None(A)``.
1901
1922
clip : bool, default: False
1902
- If ``True`` values falling outside the range ``[vmin, vmax]``,
1903
- are mapped to 0 or 1, whichever is closer, and masked values
1904
- remain masked.
1923
+ Determines the behavior for mapping values outside the range
1924
+ ``[vmin, vmax]``.
1925
+
1926
+ If clipping is off, values outside the range ``[vmin, vmax]`` are also
1927
+ transformed by the power function, resulting in values outside ``[0, 1]``. For
1928
+ a standard use with colormaps, this behavior is desired because colormaps
1929
+ mark these outside values with specific colors for *over* or *under*.
1905
1930
1906
- Clipping silently defeats the purpose of setting the over and under
1907
- colors, so it is likely to lead to surprises; therefore the default
1908
- is ``clip=False``.
1931
+ If ``True`` values falling outside the range ``[vmin, vmax]``,
1932
+ are mapped to 0 or 1, whichever is closer. This makes these values
1933
+ indistinguishable from regular boundary values and can lead to
1934
+ misinterpretation of the data.
1909
1935
1910
1936
Notes
1911
1937
-----
0 commit comments