Skip to content

DOC: Updating docstring to numpy doc format for errorbar #7032

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 14 commits into from
Sep 14, 2016

Conversation

S-Alvanides
Copy link
Contributor

Hi matplotlib contributor,

we updated the docstring of errorbar to the numpy doc format. @NelleV

Thanks for your patience,
Benedikt and Seraphin

subsamples the errorbars. e.g., if errorevery=5, errorbars for
every 5-th datapoint will be plotted. The data plot itself still
shows all data points.

Returns
-------
plotline: :class:`~matplotlib.lines.Line2D` instance
Copy link
Member

Choose a reason for hiding this comment

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

For numpydoc to render properly, you need to add a space after plotline and before ":".

@NelleV
Copy link
Member

NelleV commented Sep 5, 2016

Hello,

Thanks for the patch!
The matplotlib code follows the pep8 recommendations. The patch breaks a couple of these recommendations, mostly whitespace issues. Here is the traceback:

/home/travis/build/matplotlib/matplotlib/lib/matplotlib/axes/_axes.py:2705:19: W291 trailing whitespace
/home/travis/build/matplotlib/matplotlib/lib/matplotlib/axes/_axes.py:2707:1: W293 blank line contains whitespace
/home/travis/build/matplotlib/matplotlib/lib/matplotlib/axes/_axes.py:2708:80: E501 line too long (91 > 79 characters)
/home/travis/build/matplotlib/matplotlib/lib/matplotlib/axes/_axes.py:2764:18: W291 trailing whitespace
/home/travis/build/matplotlib/matplotlib/lib/matplotlib/axes/_axes.py:2766:21: W291 trailing whitespace
/home/travis/build/matplotlib/matplotlib/lib/matplotlib/axes/_axes.py:2767:80: E501 line too long (81 > 79 characters)
/home/travis/build/matplotlib/matplotlib/lib/matplotlib/axes/_axes.py:2792:1: W293 blank line contains whitespace

*xerr*/*yerr*: [ scalar | N, Nx1, or 2xN array-like ]
Parameters
----------
x : scalar
Copy link
Member

Choose a reason for hiding this comment

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

There is whitespace at the end of this line. Can you please remove it?

@NelleV
Copy link
Member

NelleV commented Sep 5, 2016

Apart from my comments, great job!

@NelleV
Copy link
Member

NelleV commented Sep 5, 2016

There is also a slight problem of rendering: I am not sure what the problem is, but I'll look again once you update the PR with the changes. These might actually fix the rendering problem.

Plot *x* versus *y* with error deltas in *yerr* and *xerr*.
Vertical errorbars are plotted if *yerr* is not *None*.
Horizontal errorbars are plotted if *xerr* is not *None*.
"""Plot an errorbar graph.
Copy link
Member

Choose a reason for hiding this comment

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

This should remain on a separate line; I think this is causing the rendering issue @NelleV noted.

@QuLogic
Copy link
Member

QuLogic commented Sep 6, 2016

It appears you have not set the config for your git client. All your commits are attributed to "Your Name you@example.com", which is probably not what you want.

@daurer
Copy link

daurer commented Sep 6, 2016

We tried to address all problems listed. @NelleV @Seraf69

Benedikt and Seraphin

----------
x : scalar
y : scalar

Copy link
Member

Choose a reason for hiding this comment

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

There are still spaces here.


Examples
-------
Copy link
Member

Choose a reason for hiding this comment

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

You have a tiny problem here: there is a dash missing to underline the whole section.

@NelleV
Copy link
Member

NelleV commented Sep 14, 2016

This looks good! Thanks for the contribution.
Here is how it looks:

errorbar

@NelleV NelleV changed the title [WIP] DOC: Updating docstring to numpy doc format for errorbar [MRG+1] DOC: Updating docstring to numpy doc format for errorbar Sep 14, 2016
@tacaswell tacaswell merged commit 38be7ae into matplotlib:master Sep 14, 2016
tacaswell added a commit that referenced this pull request Sep 14, 2016
DOC: Updating docstring to numpy doc format for errorbar
@tacaswell
Copy link
Member

backported to v2.x as 55d7a4f

@Seraf69 Thanks!

@QuLogic QuLogic added this to the 2.0 (style change major release) milestone Sep 14, 2016
@daurer daurer deleted the docs_errorbar branch September 14, 2016 06:41
@QuLogic QuLogic changed the title [MRG+1] DOC: Updating docstring to numpy doc format for errorbar DOC: Updating docstring to numpy doc format for errorbar Oct 16, 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