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

Some stack_plot calls give an IndexError. #296

Open
Jihoon opened this issue Nov 19, 2019 · 3 comments
Open

Some stack_plot calls give an IndexError. #296

Jihoon opened this issue Nov 19, 2019 · 3 comments

Comments

@Jihoon
Copy link

Jihoon commented Nov 19, 2019

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.

@danielhuppmann
Copy link
Member

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).

@Jihoon
Copy link
Author

Jihoon commented Nov 26, 2019

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

@znicholls
Copy link
Collaborator

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

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

No branches or pull requests

3 participants