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

Commit6634d2a

Browse files
authored
Merge pull request#24259 from anntzer/he
Move empty hexbin fix to make_norm_from_scale.
2 parents54d751b +847e595 commit6634d2a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

‎lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4992,9 +4992,7 @@ def reduce_C_function(C: array) -> float
49924992
# autoscale the norm with current accum values if it hasn't been set
49934993
ifnormisnotNone:
49944994
ifnorm.vminisNoneandnorm.vmaxisNone:
4995-
norm.autoscale_None(accum)
4996-
norm.vmin=np.ma.maskedifnorm.vminisNoneelsenorm.vmin
4997-
norm.vmax=np.ma.maskedifnorm.vmaxisNoneelsenorm.vmax
4995+
norm.autoscale(accum)
49984996

49994997
ifbinsisnotNone:
50004998
ifnotnp.iterable(bins):

‎lib/matplotlib/colors.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,10 +1718,14 @@ def inverse(self, value):
17181718
defautoscale(self,A):
17191719
# i.e. A[np.isfinite(...)], but also for non-array A's
17201720
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
17211723
returnsuper().autoscale(in_trf_domain)
17221724

17231725
defautoscale_None(self,A):
17241726
in_trf_domain=np.extract(np.isfinite(self._trf.transform(A)),A)
1727+
ifin_trf_domain.size==0:
1728+
in_trf_domain=np.ma.masked
17251729
returnsuper().autoscale_None(in_trf_domain)
17261730

17271731
ifbase_norm_clsisNormalize:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp