-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix step plots with hue #6944
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
Fix step plots with hue #6944
Conversation
This looks good - but from staring at the code it seems to me the logic is the same as before? |
It may appear so but it's not: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah it goes wrong in _valid_other_type(np.array([xval, yval]), [pd.Interval])
- got it.
Could you merge master then I can press the button.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks solid to me 👍🏽. @mgunyho, thank you for this addition, and welcome to the Xarray community 🎉
This PR fixes the broadcasting error when trying to plot multiple step plots, like
arr.plot.step(..., hue=...)
orarr.plot(..., drawstyle="steps-mid")
. Previously, this raised a shape error, as mentioned in #4288 (comment). Some other relevant work was started (but apparently unfinished) in #4868 and #4866, this doesn't implement those.whats-new.rst