Skip to content

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

Closed

Description

@ChrisBeaumont

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

Activity

  1. dmcdougall commented on Aug 31, 2013

    @dmcdougall
    Member

    Resolved in #2357.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions