pyam icon indicating copy to clipboard operation
pyam copied to clipboard

Some stack_plot calls give an IndexError.

Open Jihoon opened this issue 5 years ago • 3 comments

Even with matplotlib=3.0.2 (as suggested in #281), I am getting IndexError: single positional indexer is out-of-bounds by calling stack_plot(). But it doesn't apply to all stack_plot calls. I haven't identified the pattern yet, but some stack_plot calls are working fine.

When there is the error, simply replacing stack_plot with line_plot or bar_plot works fine.

Jihoon avatar Nov 19 '19 16:11 Jihoon

Thanks @Jihoon for creating this issue!

Can you please attach the data (as csv) for a minimal example that reproduces this error? I.e., only the filtered data that you want to plot plus the stack_plot() arguments. (If you aren't sure how to do it, let's discuss on Slack).

danielhuppmann avatar Nov 20 '19 09:11 danielhuppmann

Thanks @danielhuppmann. I attach an xlsx here since it doesn't allow csv..

With the dataframe given below, what I tested was data.filter(region="World").stack_plot(), while this data.filter(region="World").line_plot() is working fine.

debugdata_stackplot.xlsx

Jihoon avatar Nov 26 '19 13:11 Jihoon

Is this solved now @Jihoon? I can't reproduce with that data..

znicholls avatar May 11 '20 06:05 znicholls