Skip to content

Make set_yscale("log") consistent with semilogy() #8537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2983,7 +2983,7 @@ def set_xscale(self, value, **kwargs):
# If the scale is being set to log, clip nonposx to prevent headaches
# around zero
if value.lower() == 'log' and 'nonposx' not in kwargs:
kwargs['nonposx'] = 'clip'
kwargs['nonposx'] = 'mask'

g = self.get_shared_x_axes()
for ax in g.get_siblings(self):
Expand Down Expand Up @@ -3277,7 +3277,7 @@ def set_yscale(self, value, **kwargs):
# If the scale is being set to log, clip nonposy to prevent headaches
# around zero
if value.lower() == 'log' and 'nonposy' not in kwargs:
kwargs['nonposy'] = 'clip'
kwargs['nonposy'] = 'mask'

g = self.get_shared_y_axes()
for ax in g.get_siblings(self):
Expand Down
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/log_scales.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.