Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit85c06cf

Browse files
authored
Merge pull request#24460 from anntzer/an
Define autoscale() based on autoscale_None().
2 parents218cdff +3ac96eb commit85c06cf

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

‎lib/matplotlib/colors.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,9 +1371,8 @@ def inverse(self, value):
13711371

13721372
defautoscale(self,A):
13731373
"""Set *vmin*, *vmax* to min, max of *A*."""
1374-
A=np.asanyarray(A)
1375-
self.vmin=A.min()
1376-
self.vmax=A.max()
1374+
self.vmin=self.vmax=None
1375+
self.autoscale_None(A)
13771376

13781377
defautoscale_None(self,A):
13791378
"""If vmin or vmax are not set, use the min/max of *A* to set them."""
@@ -1715,14 +1714,8 @@ def inverse(self, value):
17151714
.reshape(np.shape(value)))
17161715
returnvalue[0]ifis_scalarelsevalue
17171716

1718-
defautoscale(self,A):
1719-
# i.e. A[np.isfinite(...)], but also for non-array A's
1720-
in_trf_domain=np.extract(np.isfinite(self._trf.transform(A)),A)
1721-
ifin_trf_domain.size==0:
1722-
in_trf_domain=np.ma.masked
1723-
returnsuper().autoscale(in_trf_domain)
1724-
17251717
defautoscale_None(self,A):
1718+
# i.e. A[np.isfinite(...)], but also for non-array A's
17261719
in_trf_domain=np.extract(np.isfinite(self._trf.transform(A)),A)
17271720
ifin_trf_domain.size==0:
17281721
in_trf_domain=np.ma.masked

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp