DOC Convert axes docstrings to numpydoc: #7205 #7389

Merged
merged 4 commits into from Nov 7, 2016

Conversation

Projects
None yet
4 participants
Contributor

cfackler commented Nov 3, 2016

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

cfackler added some commits Nov 1, 2016

@cfackler cfackler Convert docstring for set_xlim(), per issue #7205
Convert set_xlim() docstring to numpydoc format.
a2b990d
@cfackler cfackler Convert set_xlim and set_ylim docstrings; #7205
Docstrings converted to numpydoc format.
49a8d83
@cfackler cfackler Convert get_xlim and get_ylim docstrings
349909e
@NelleV

NelleV approved these changes Nov 3, 2016

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.

lib/matplotlib/axes/_base.py
+ Returns
+ -------
+ xlimits : tuple
+ Returns the current x-axis limits, reflecting any changes
@NelleV

NelleV Nov 3, 2016

Contributor

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

lib/matplotlib/axes/_base.py
- 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.
@NelleV

NelleV Nov 3, 2016

Contributor

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

NelleV changed the title from DOC Convert axes docstrings to numpydoc: #7205 to [MRG+1] DOC Convert axes docstrings to numpydoc: #7205 Nov 3, 2016

tacaswell added this to the 2.0.1 (next bug fix release) milestone Nov 3, 2016

@cfackler cfackler DOC Remove old API notes from updated docstrings
803a05f
Contributor

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

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.01%) to 61.829%
Details
Contributor

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 tacaswell added a commit that referenced this pull request Nov 8, 2016

@NelleV @tacaswell NelleV + tacaswell Merge pull request #7389 from cfackler/update-axes-docstrings-fixed
DOC Convert axes docstrings to numpydoc: #7205
Conflicts:
	lib/matplotlib/axes/_base.py
	  Minor text conflict in set_xlim docs
814fff5
Owner

tacaswell commented Nov 8, 2016

Backported to v2.x as 814fff5

Kojoley changed the title from [MRG+1] DOC Convert axes docstrings to numpydoc: #7205 to DOC Convert axes docstrings to numpydoc: #7205 Nov 8, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment