X Tutup
Skip to content

Make bars stick to explicitly-specified edges.#7605

Merged
tacaswell merged 1 commit intomatplotlib:masterfrom
QuLogic:bar-sticky-edges
Dec 11, 2016
Merged

Make bars stick to explicitly-specified edges.#7605
tacaswell merged 1 commit intomatplotlib:masterfrom
QuLogic:bar-sticky-edges

Conversation

@QuLogic
Copy link
Copy Markdown
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 anntzer and efiring December 11, 2016 01:35
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

Thanks! backported as 4b53790

@QuLogic
Copy link
Copy Markdown
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

X Tutup