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

Commit9d13b2d

Browse files
committed
Force autoscaling immediately after setting a scale.
1 parentcf2ef39 commit9d13b2d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎lib/matplotlib/axes/_base.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3252,7 +3252,6 @@ def set_xscale(self, value, **kwargs):
32523252
- `matplotlib.scale.SymmetricalLogScale`
32533253
- `matplotlib.scale.LogitScale`
32543254
3255-
32563255
Notes
32573256
-----
32583257
By default, Matplotlib supports the above mentioned scales.
@@ -3265,7 +3264,9 @@ def set_xscale(self, value, **kwargs):
32653264
ax.xaxis._set_scale(value,**kwargs)
32663265
ax._update_transScale()
32673266
ax.stale=True
3268-
self._request_autoscale_view(scaley=False)
3267+
# Force autoscaling now, to take advantage of the scale locator's
3268+
# nonsingular() before it possibly gets swapped out by the user.
3269+
self.autoscale_view(scaley=False)
32693270

32703271
@cbook._make_keyword_only("3.2","minor")
32713272
defget_xticks(self,minor=False):
@@ -3637,7 +3638,6 @@ def set_yscale(self, value, **kwargs):
36373638
- `matplotlib.scale.SymmetricalLogScale`
36383639
- `matplotlib.scale.LogitScale`
36393640
3640-
36413641
Notes
36423642
-----
36433643
By default, Matplotlib supports the above mentioned scales.
@@ -3650,7 +3650,9 @@ def set_yscale(self, value, **kwargs):
36503650
ax.yaxis._set_scale(value,**kwargs)
36513651
ax._update_transScale()
36523652
ax.stale=True
3653-
self._request_autoscale_view(scalex=False)
3653+
# Force autoscaling now, to take advantage of the scale locator's
3654+
# nonsingular() before it possibly gets swapped out by the user.
3655+
self.autoscale_view(scalex=False)
36543656

36553657
@cbook._make_keyword_only("3.2","minor")
36563658
defget_yticks(self,minor=False):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp