@@ -1214,8 +1214,8 @@ def __init__(self, vmin=None, vmax=None, clip=False):
12141214 are mapped to 0 or 1, whichever is closer, and masked values are
12151215 set to 1. If ``False`` masked values remain masked.
12161216
1217- Clipping silently defeats the purpose of setting the over, under,
1218- and masked colors in a colormap, so it is likely to lead to
1217+ Clipping silently defeats the purpose of setting the over and
1218+ under colors in a colormap, so it is likely to lead to
12191219 surprises; therefore the default is ``clip=False``.
12201220
12211221 Notes
@@ -1775,8 +1775,8 @@ def forward(values: array-like) -> array-like
17751775 are mapped to 0 or 1, whichever is closer, and masked values are
17761776 set to 1. If ``False`` masked values remain masked.
17771777
1778- Clipping silently defeats the purpose of setting the over, under,
1779- and masked colors in a colormap, so it is likely to lead to
1778+ Clipping silently defeats the purpose of setting the over and
1779+ under colors in a colormap, so it is likely to lead to
17801780 surprises; therefore the default is ``clip=False``.
17811781 """
17821782
@@ -1858,9 +1858,34 @@ def linear_width(self, value):
18581858
18591859
18601860class PowerNorm (Normalize ):
1861- """
1861+ r """
18621862 Linearly map a given value to the 0-1 range and then apply
18631863 a power-law normalization over that range.
1864+
1865+ Parameters
1866+ ----------
1867+ gamma : float
1868+ Power law exponent.
1869+ vmin, vmax : float or None
1870+ If *vmin* and/or *vmax* is not given, they are initialized from the
1871+ minimum and maximum value, respectively, of the first input
1872+ processed; i.e., ``__call__(A)`` calls ``autoscale_None(A)``.
1873+ clip : bool, default: False
1874+ If ``True`` values falling outside the range ``[vmin, vmax]``,
1875+ are mapped to 0 or 1, whichever is closer, and masked values
1876+ remain masked.
1877+
1878+ Clipping silently defeats the purpose of setting the over and under
1879+ colors, so it is likely to lead to surprises; therefore the default
1880+ is ``clip=False``.
1881+
1882+ Notes
1883+ -----
1884+ The normalization formula is
1885+
1886+ .. math::
1887+
1888+ \left ( \frac{x - v_{min}}{v_{max} - v_{min}} \right )^{\gamma}
18641889 """
18651890 def __init__ (self , gamma , vmin = None , vmax = None , clip = False ):
18661891 super ().__init__ (vmin , vmax , clip )
0 commit comments