-
Notifications
You must be signed in to change notification settings - Fork 119
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
Unexpected behaviour in stack_plot()
#266
Comments
Nice pick up @danielhuppmann !
I think this can be fixed by altering Line 475 in 127680a
pos_cols = [c for c in _df if (_df[c] >= 0).all()] (>= rather than > )
As you've seen in the comments, this case where a timeseries goes positive, then negative, then back again is a case we didn't work through. We were not sure how you'd even want to plot this (as you probably have to jump over another timeseries so you lose the continuity we were trying to get). New functionality for you to play with! |
Thanks for the assist on fixing issue 1, @znicholls! Issue 2 is indeed a tricky beast... |
You could just have an Line 449 in 127680a
|
I was thinking that splitting all timeseries data into a positive and negative component might do the trick... But making it pretty afterwards will be a pain. |
Yep I think that's probably best. Keeping track of colours and joining dots as they cross back and forth will be hard. If you do it with loops initially I think it should be easier to implement and then it can be refactored to vector operations afterwards. |
Description of the issue
I've been trying to use the
stack_plot()
function for some follow-up SR15 assessment, and noticed two major issues.Illustration
More insights
In the source of
stack_plot()
, there is this docstring...The text was updated successfully, but these errors were encountered: