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

Bad xlim/ylim when using shared axes subplots and an empty subplot #2356

Closed
ChrisBeaumont opened this issue Aug 30, 2013 · 1 comment
Closed

Comments

@ChrisBeaumont
Copy link
Contributor

The following code

fig, axes = plt.subplots(nrows=1, ncols=2, sharex=True, sharey=True)
axes[0].plot([1,2,3])
print axes[0].get_xlim(), axes[0].get_ylim()
plt.show()

outputs

(-0.059999999999999998, 0.059999999999999998) (-0.059999999999999998, 0.059999999999999998)

The axis limits are only updated to sane values once the second axes is populated with something.

If a subplot with shared axes is empty, I expect the view limits to be set according to the non-empty plots

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

No branches or pull requests

2 participants