Skip to content

plotting.bar should not manually set a tick offset #7262

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

Closed
tacaswell opened this issue May 28, 2014 · 6 comments
Closed

plotting.bar should not manually set a tick offset #7262

tacaswell opened this issue May 28, 2014 · 6 comments
Labels

Comments

@tacaswell
Copy link
Contributor

The align kwarg of Axes.bar{h} will take care of all of that logic for you. Making it so that the tick labels do not match the data coordinates cause problems when trying to plot overlays (see http://stackoverflow.com/q/23909249/380231).

@tacaswell
Copy link
Contributor Author

@jorisvandenbossche
Copy link
Member

@tacaswell But it seems the code is already using align='center'? (https://github.com/pydata/pandas/blob/master/pandas/tools/plotting.py#L1789) (did not yet look more in detail)

@sinhrks
Copy link
Member

sinhrks commented May 28, 2014

This is fixed in 0.14 (#6691).

@jreback
Copy link
Contributor

jreback commented May 28, 2014

closing as fixed

@jreback jreback closed this as completed May 28, 2014
@jorisvandenbossche
Copy link
Member

I can confirm this indeed works in master, so plotting a line (as done in the SO question) will be automatically in the middle of the bars.

@tacaswell
Copy link
Contributor Author

Sorry for the noise, the checkout I have on my computer is apparently out of date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants