Skip to content
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

Fixed handling of bar(.., bottom=None, log=True) #1889

Merged
merged 2 commits into from May 21, 2013
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/matplotlib/axes.py
Expand Up @@ -4797,6 +4797,7 @@ def make_iterable(x):
if _bottom is None:
if self.get_yscale() == 'log':
adjust_ylim = True
bottom = [1e-100]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to move this outside of the if statement and just set it to [0]. That was the reason for making the change (nonposy=True) that got this all started. That way it will behave well even if someone wants to work with very small numbers.

else:
bottom = [0]
nbars = len(left)
Expand All @@ -4812,6 +4813,7 @@ def make_iterable(x):
if _left is None:
if self.get_xscale() == 'log':
adjust_xlim = True
left = [1e-100]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

else:
left = [0]
nbars = len(bottom)
Expand Down