Skip to content

plotting with Gridspec : index is out of bounds #10819

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
heelancd opened this issue Aug 14, 2015 · 1 comment · Fixed by #10879
Closed

plotting with Gridspec : index is out of bounds #10819

heelancd opened this issue Aug 14, 2015 · 1 comment · Fixed by #10879
Labels
Milestone

Comments

@heelancd
Copy link

I came across the same error described in this stack post. I didn't experience the error until upgrading to 0.16.2. Like others who commented, downgrading to 0.15.2 fixed the issue. I couldn't find it reported anywhere else so I wanted to submit an issue.

@sinhrks
Copy link
Member

sinhrks commented Aug 17, 2015

Thanks for the report.

df3.plot(x='A', y='B', ax=ax2)
#   File "pandas/tools/plotting.py", line 3335, in _handle_shared_axes
#     layout[ax.rowNum, ax.colNum] = ax.get_visible()
# IndexError: index 4 is out of bounds for axis 0 with size 3

It looks using ax.rowNum, ax.colNum as indices is not a good idea. Indices must meet the shape of layout. PR is appreciated:)

https://github.com/pydata/pandas/blob/master/pandas/tools/plotting.py#L3335

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

Successfully merging a pull request may close this issue.

3 participants