plotting with Gridspec : index is out of bounds #10819

Closed
heelancd opened this Issue Aug 14, 2015 · 1 comment

Comments

Projects
None yet
3 participants

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.

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

jreback added this to the 0.17.0 milestone Aug 21, 2015

jreback closed this in #10879 Sep 1, 2015

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