8000 DOC: changed documentation for axvspan to numpydoc format by NelleV · Pull Request #7267 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@NelleV
Copy link
Member
@NelleV NelleV commented Oct 13, 2016

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).

@NelleV NelleV changed the title DOC changed documentation for axvspan to numpydoc format [MRG] DOC changed documentation for axvspan to numpydoc format Oct 13, 2016
@tacaswell tacaswell changed the title [MRG] DOC changed documentation for axvspan to numpydoc format [MRG+1] DOC changed documentation for axvspan to numpydoc format Oct 13, 2016
--------
axhspan
%(Polygon)s
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're still removing this here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The consensus is that the links are a better option.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may document this in a MEP somewhere.

----------------
**kwargs
Optional parameters are properties of the class
matplotlib.patches.Polygon.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should link?

x = 1.55 that spans the yrange of the axes.
.. seealso::
>>> axvspan(1.25, 1.55, facecolor='g', alpha=0.5)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the See Also sections are helpful. But I'd understand if they're a pain to maintain.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It wasn't removed; it just got a numpydoc heading instead of a sphinx one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh yes. I see that now.

@phobson phobson changed the title [MRG+1] DOC changed documentation for axvspan to numpydoc format [MRG+2] DOC changed documentation for axvspan to numpydoc format Oct 15, 2016
@phobson phobson merged commit 7d0be18 into matplotlib:master Oct 15, 2016
@phobson phobson changed the title [MRG+2] DOC changed documentation for axvspan to numpydoc format DOC: changed documentation for axvspan to numpydoc format Oct 15, 2016
phobson added a commit that referenced this pull request Oct 15, 2016
DOC: changed documentation for axvspan to numpydoc format
@phobson
Copy link
Member
phobson commented Oct 15, 2016

backported to v2.x as 05fec77

@QuLogic QuLogic added this to the 2.0 (style change major release) milestone Oct 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

0