-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
DOC: Add summary lines to plot types #27929
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.
Generally think this is a good idea/is better than just the link out. Going back and forth on wind barb b/c technically I think it's just a glyph that encodes magnitude and direction, but also yes it's conventionally used for wind.
IMHO it's meaningful to give a one-sentence summary on the individual pages, e.g. at https://matplotlib.org/stable/plot_types/basic/plot.html#sphx-glr-plot-types-basic-plot-py > Plot y versus x as lines and/or markers. > > See `plot`. is more helpful than just > See `plot`. Users can already decide if that's the correct function for them and whether it's worth following the link. Also, the first sentence is used in the tooltip on the index page, where the current "See ..." is not helpful. I believe it's ok to just copy the text. Automatic insertion or check for consistency are not worth the added effort. First, these summary lines change rarely. Second, even if we improve the method summary and forget to udpate here, nothing really bad happens; we've maybe a slightly less optimal description here, but that's still way better than no description at all. Semi-OT: I changed the barbs summary from > Plot a 2D field of barbs. to > Plot a 2D field of wind barbs. because, AFAIK these are only used for wind, and that makes the context more clear. People outside of metrology may not know what barbs are so giving that extra context is reasonable.
bb88598
to
a8d8915
Compare
galleries/plot_types/basic/stairs.py
Outdated
@@ -2,6 +2,7 @@ | |||
============== | |||
stairs(values) | |||
============== | |||
A stepwise constant function as a line with bounding edges or a filled plot. |
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.
This might be silly but I think if we do this then the language should be obnouxisly consistent - the other descriptions start "Plot/Draw/Create"
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.
At the risk of going off-topic and getting bogged down, I've changed the summary line for stairs()
.
IMHO it's meaningful to give a one-sentence summary on the individual pages, e.g. at
https://matplotlib.org/stable/plot_types/basic/plot.html#sphx-glr-plot-types-basic-plot-py
is more helpful than just
Users can already decide if that's the correct function for them and whether it's worth following the link. Also, the first sentence is used in the tooltip on the index page, where the current "See ..." is not helpful.
I believe it's ok to just copy the text. Automatic insertion or check for consistency are not worth the added complexity. First, these summary lines change rarely. Second, even if we improve the method summary and forget to udpate here, nothing really bad happens; we've maybe a slightly less optimal description here, but that's still way better than no description at all.
Semi-OT: I changed the barbs summary from
to
because, AFAIK these are only used for wind, and that makes the context more clear. People outside of metrology may not know what barbs are so giving that extra context is reasonable.