Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0385071

Browse files
committed
Tweaks to colors.Normalize and cm.ScalarMappable docstrings.
modified: cm.py in ScalarMappable.__init__ "If not given or *None*," ==> "If *None*," modified: colors.py in Normalize.__call__ Removed this: "``norm.__call__(value) <==> norm(value)``" Mentioned that __call__ takes *value* and returns the normalized data.
1 parent 7145d19 commit 0385071

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

lib/matplotlib/cm.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,10 @@ def __init__(self, norm=None, cmap=None):
178178
norm : :class:`matplotlib.colors.Normalize` instance
179179
The normalizing object which scales data, typically into the
180180
interval ``[0, 1]``.
181-
If not given or *None*, norm defaults to a *colors.Normalize*
182-
object which initializes its scaling based on the first
183-
data processed.
181+
If *None*, *norm* defaults to a *colors.Normalize* object which
182+
initializes its scaling based on the first data processed.
184183
cmap : str or :class:`~matplotlib.colors.Colormap` instance
185184
The colormap used to map normalized data values to RGBA colors.
186-
187185
"""
188186

189187
self.callbacksSM = cbook.CallbackRegistry()

lib/matplotlib/colors.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -905,12 +905,10 @@ def process_value(value):
905905

906906
def __call__(self, value, clip=None):
907907
"""
908-
``norm.__call__(value) <==> norm(value)``
909-
910-
Normalize data in the ``[vmin, vmax]`` interval into the
911-
``[0.0, 1.0]`` interval. *clip* defaults to *self.clip*
912-
(which defaults to *False*). If not already initialized,
913-
*vmin* and *vmax* are initialized using
908+
Normalize *value* data in the ``[vmin, vmax]`` interval into
909+
the ``[0.0, 1.0]`` interval and return it. *clip* defaults
910+
to *self.clip* (which defaults to *False*). If not already
911+
initialized, *vmin* and *vmax* are initialized using
914912
*autoscale_None(value)*.
915913
"""
916914
if clip is None:

0 commit comments

Comments
 (0)