DOC: changed documentation for axvspan to numpydoc format#7267
DOC: changed documentation for axvspan to numpydoc format#7267phobson merged 2 commits intomatplotlib:masterfrom NelleV:wiolcia_master
Conversation
| -------- | ||
| axhspan | ||
|
|
||
| %(Polygon)s |
There was a problem hiding this comment.
We're still removing this here?
There was a problem hiding this comment.
The consensus is that the links are a better option.
There was a problem hiding this comment.
I think this is the general consensus to move away from these, and have nicer documentation on the artists themselves. At least that's what I understood from different conversation, even during the matplotlib call or on tickets.
There was a problem hiding this comment.
I may document this in a MEP somewhere.
| ---------------- | ||
| **kwargs | ||
| Optional parameters are properties of the class | ||
| matplotlib.patches.Polygon. |
| x = 1.55 that spans the yrange of the axes. | ||
|
|
||
| .. seealso:: | ||
| >>> axvspan(1.25, 1.55, facecolor='g', alpha=0.5) |
There was a problem hiding this comment.
What's the consensus on the style and "completeness" of examples like this?
My thought is that something like:
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.axvspan(1.25, 1.55, facecolor='g', alpha=0.5)
plt.show()or a link to the gallery/examples would be better.
I don't feel very strongly about that, though.
There was a problem hiding this comment.
I agree that a full runnable example would be much better. I am not a big fan of links in the gallery as they are only good for sphinx rendered documentation, but do not render properly in terminal docstring.
| >>> axvspan(1.25, 1.55, facecolor='g', alpha=0.5) | ||
|
|
||
| :meth:`axhspan` | ||
| for example plot and source code |
There was a problem hiding this comment.
I think the See Also sections are helpful. But I'd understand if they're a pain to maintain.
There was a problem hiding this comment.
It wasn't removed; it just got a numpydoc heading instead of a sphinx one.
DOC: changed documentation for axvspan to numpydoc format
|
backported to v2.x as 05fec77 |
Updated documentation of axvspan function to numpydoc format, as part of a project during the ASPP2016 Summer School
supersedes #7039 (fixes the pep8 compliancy issues).