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

Skip to content

Commit 2f9fd02

Browse files
jpmatterntimhoffm
andcommitted
Apply suggestions from code review
Co-authored-by: Tim Hoffmann <[email protected]>
1 parent a8de87b commit 2f9fd02

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

lib/matplotlib/colors.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,7 +1256,7 @@ def __call__(self, value, clip=None):
12561256

12571257

12581258
class SymNorm(Normalize):
1259-
def __init__(self, vcenter=0.0, vmax=None, clip=False):
1259+
def __init__(self, vcenter=0, vmax=None, clip=False):
12601260
"""
12611261
Normalize symmetrical data around a center (0 by default).
12621262
@@ -1269,9 +1269,8 @@ def __init__(self, vcenter=0.0, vmax=None, clip=False):
12691269
12701270
Parameters
12711271
----------
1272-
vcenter : float, optional
1272+
vcenter : float, default: 0
12731273
The data value that defines ``0.5`` in the normalization.
1274-
Defaults to ``0.0``.
12751274
vmax : float, optional
12761275
The data value that defines ``1.0`` in the normalization.
12771276
Defaults to the sum of *vcenter* plus the largest absolute
@@ -1303,7 +1302,7 @@ def __init__(self, vcenter=0.0, vmax=None, clip=False):
13031302
def autoscale(self, A):
13041303
"""
13051304
Set *vmax* to *vcenter* + max(abs(*A*-*vcenter*)),
1306-
then mirror *vmax* around *vcenter* to set *vmin*.
1305+
then set *vmin* by mirroring *vmax* at *vcenter*.
13071306
"""
13081307
A = np.asanyarray(A)
13091308
self.vmax = self._vcenter + max(self._vcenter-A.min(),

0 commit comments

Comments
 (0)