Skip to content

Mask invalid values by default when setting log scale #8836

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

Merged
merged 5 commits into from
Jul 15, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add note to errobar
  • Loading branch information
dstansby committed Jul 3, 2017
commit 029fe210fed5dbab072537bbe692fc7cc533a58f
6 changes: 3 additions & 3 deletions doc/api/api_changes/2017-07-03-DS-logscale_masked.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Default behavior of log scales changed to mask <= 0 values
``````````````````````````````````````````````````````````

Calling `matplotlib.Axes.set_xscale` or `matplotlib.Axes.set_yscale` now uses
'mask' as the default method to handle invalid values (as opposed to 'clip').
This means that any values <= 0 on a log scale will not be shown.
Calling `matplotlib.axes.Axes.set_xscale` or `matplotlib.axes.Axes.set_yscale`
now uses 'mask' as the default method to handle invalid values (as opposed to
'clip'). This means that any values <= 0 on a log scale will not be shown.

Previously they were clipped to a very small number and shown.
4 changes: 4 additions & 0 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2751,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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy