Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC Convert axes docstrings to numpydoc: #7205 #7389

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

Merged
merged 4 commits into from
Nov 7, 2016

Conversation

cfackler
Copy link
Contributor

@cfackler cfackler commented Nov 3, 2016

I've converted several docstrings for the axes class to numpydoc format.

Copy link
Member

@NelleV NelleV left a comment

Choose a reason for hiding this comment

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

Hi @cfackler
Thanks a lot for this patch! This is a great improvement on our documentation.

I've added some comments, but I am fine merging as is.
My greatest concern is the fact that we seem to document several ways to do one action. I think as much as possible we should try to document one and only one way to do an action, as consistently as possible including in our response to SO questions.

Returns
-------
xlimits : tuple
Returns the current x-axis limits, reflecting any changes
Copy link
Member

Choose a reason for hiding this comment

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

I'd say "returns the new x-axis limits"

set_ylim(top=1) # bottom unchanged
top : scalar, optional
The top ylim (default: None, which leaves the top limit
unchanged). The previous name `ymax` may be used instead.
Copy link
Member

Choose a reason for hiding this comment

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

I'd avoid mentioning the old API. As much as possible, we should advertise one and only way to do an action.

@NelleV NelleV changed the title DOC Convert axes docstrings to numpydoc: #7205 [MRG+1] DOC Convert axes docstrings to numpydoc: #7205 Nov 3, 2016
@tacaswell tacaswell added this to the 2.0.1 (next bug fix release) milestone Nov 3, 2016
@cfackler
Copy link
Contributor Author

cfackler commented Nov 6, 2016

@NelleV Thanks for the suggestions. I agree and have updated the PR.

@NelleV NelleV merged commit 1d4244f into matplotlib:master Nov 7, 2016
@NelleV
Copy link
Member

NelleV commented Nov 7, 2016

Thanks @cfackler for the patch!

The cherry-pick to v.2.x conficts and I don't have time to look into it tonight.

tacaswell pushed a commit that referenced this pull request Nov 8, 2016
DOC Convert axes docstrings to numpydoc: #7205
Conflicts:
	lib/matplotlib/axes/_base.py
	  Minor text conflict in set_xlim docs
@tacaswell
Copy link
Member

Backported to v2.x as 814fff5

@Kojoley Kojoley changed the title [MRG+1] DOC Convert axes docstrings to numpydoc: #7205 DOC Convert axes docstrings to numpydoc: #7205 Nov 8, 2016
@QuLogic QuLogic modified the milestones: 2.0.1 (next bug fix release), 2.0 (style change major release) Dec 7, 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.

4 participants