8000 Make bars stick to explicitly-specified edges. by QuLogic · Pull Request #7605 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Make bars stick to explicitly-specified edges. #7605

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 1 commit into from
Dec 11, 2016

Conversation

QuLogic
Copy link
Member
@QuLogic QuLogic commented Dec 11, 2016

Previously, they would stick to 0 regardless of any explicit bottom/left position specified by the respective keyword arguments. I assume this was just a minor oversight.

The modified example shows what's wrong here; on v2.x, it adds margins on all four side once the explicit y-limits are removed. With this change, the bottom margin is removed only. No tests now, but I can try and think one up.

Previously, they would stick to 0 regardless of any explicit bottom/left
position specified by the respective keyword arguments.
@QuLogic QuLogic added this to the 2.0 (style change major release) milestone Dec 11, 2016
@QuLogic QuLogic requested review from efiring and anntzer December 11, 2016 01:35
Copy link
Member
@efiring efiring left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for catching and fixing my mistake.

@anntzer
Copy link
Contributor
anntzer commented Dec 11, 2016

My guess is that the example dates back to a point where bar() didn't really support log scale (it was added by jdh in 2004, fe288f4) other than by passing an explicit bottom, so in practice it may be better to just get rid of the bottom kwarg here (in which case everything "already works"). Or have two subplots in the example to show log bars with and without explicit bottoms.

The fix looks good. If you don't plan to update the example I'd suggest opening a separate (nonblocking) issue.

@tacaswell tacaswell merged commit 1b7bec6 into matplotlib:master Dec 11, 2016
tacaswell added a commit that referenced this pull request Dec 11, 2016
MNT: Make bars stick to explicitly-specified edges.
@tacaswell
Copy link
Member

Thanks! backported as 4b53790

@QuLogic
Copy link
Member Author
QuLogic commented Dec 11, 2016

Oops, meant to aim that directly at v2.x; thanks for the backport!

@QuLogic QuLogic deleted the bar-sticky-edges branch December 11, 2016 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0