Mask invalid values by default when setting log scale by dstansby · Pull Request #8836 · matplotlib/matplotlib · GitHub
Skip to content
Merged
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
8 changes: 8 additions & 0 deletions doc/api/api_changes/2017-07-03-DS-logscale_masked.rst
6 changes: 4 additions & 2 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1578,7 +1578,6 @@ def semilogx(self, *args, **kwargs):
self.cla()
d = {'basex': kwargs.pop('basex', 10),
'subsx': kwargs.pop('subsx', None),
'nonposx': kwargs.pop('nonposx', 'mask'),
}

self.set_xscale('log', **d)
Expand Down Expand Up @@ -1629,7 +1628,6 @@ def semilogy(self, *args, **kwargs):
self.cla()
d = {'basey': kwargs.pop('basey', 10),
'subsy': kwargs.pop('subsy', None),
'nonposy': kwargs.pop('nonposy', 'mask'),
}
self.set_yscale('log', **d)
b = self._hold
Expand Down Expand Up @@ -2753,6 +2751,10 @@ def errorbar(self, x, y, yerr=None, xerr=None,

%(Line2D)s

Notes
-----
Error bars with negative values will not be shown when plotted on a
logarithmic axis.
"""
kwargs = cbook.normalize_kwargs(kwargs, _alias_map)
# anything that comes in as 'None', drop so the default thing
Expand Down
8 changes: 4 additions & 4 deletions lib/matplotlib/axes/_base.py
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.
Loading