-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Update lib/matplotlib/stackplot.py #29853
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
Conversation
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.
Thank you for opening your first PR into Matplotlib!
If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.
You can also join us on gitter for real-time discussion.
For details on testing, writing docs, and our review process, please see the developer guide
We strive to be a welcoming and open project. Please follow our Code of Conduct.
Thanks for the pull request! However, the existing "array-like" is sufficient, see https://numpy.org/doc/2.1/glossary.html#term-array_like. A pandas DataFrame is covered by this. It's not feasible to write out any array-compatible datastructure explicitly. We would only state DataFrame explicitly if we make use of specific DataFrame features like the index, as long as we only use the column values it's a generic array-like to us. |
@timhoffm I talked to @thedatacurious about this PR a bit and it stemmed from a confusion with y b/c stackplot supports both the packed stackplot(x, y=[y1, y2, y3]) and the unpacked form stackplot(x, y1, y2, y3) form. While this PR may be doing a bit too much in its current form, I think it's fair to be a bit more explicit on allowed inputs. |
Sure, feel free to reopen and rephrase. That said, I think we should more clearly specify what array-like means. But that's a separate topic (possibly a glossary entry when we revive that, and/or an :mpl-type: link). |
@timhoffm Sure, it looks like I don't have permissions to reopen this PR, should I raise a new one? I have rephrased the edits: |
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
Please fix the trailing whitespace as reported by flake8. |
…853-on-v3.10.x Backport PR #29853 on branch v3.10.x (Update lib/matplotlib/stackplot.py)
PR summary
Update minimal examples in stackplot.py to improve clarity
PR checklist
Note: Unable to build doc in Github Codespace (already opened issue here)