8000 DOC: Updating docstring to numpy doc format for errorbar by S-Alvanides · Pull Request #7032 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Merged
Prev Previous commit
Next Next commit
[WIP] DOC: Fixed issues with whitespaces
  • Loading branch information
S-Alvanides authored and Benedikt Daurer committed Sep 7, 2016
commit 5ecdb2efce65d83fb1e7cbe3eb963af6b05f73ef
18 changes: 9 additions & 9 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2691,7 +2691,8 @@ def errorbar(self, x, y, yerr=None, xerr=None,
barsabove=False, lolims=False, uplims=False,
xlolims=False, xuplims=False, errorevery=1, capthick=None,
**kwargs):
"""Plot an errorbar graph.
"""
Plot an errorbar graph.

Plot x versus y with error deltas in yerr and xerr.
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure that the arguments should not have the distinct formatting that they originally had.

Copy link
Member

Choose a reason for hiding this comment

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

I much prefer the way it is now, and I think we've had this discussion about 3 years ago and agreed to remove the *. This do not bring much in the sphinx rendering, and clutter the python docstrings.

Vertical errorbars are plotted if yerr is not None.
Expand All @@ -2702,13 +2703,13 @@ def errorbar(self, x, y, yerr=None, xerr=None,

Parameters
----------
x : scalar
x : scalar
y : scalar
xerr/yerr : scalar or array-like, shape(n,1) or shape(2,n), optional, default: None

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.

xerr/yerr : scalar or array-like, shape(n,1) or shape(2,n), optional
If a scalar number, len(N) array-like object, or an Nx1
array-like object, errorbars are drawn at +/-value relative
to the data.
to the data. Default is None.

If a sequence of shape 2xN, errorbars are drawn at -row1
and +row2 relative to the data.
Expand Down Expand Up @@ -2759,11 +2760,11 @@ def errorbar(self, x, y, yerr=None, xerr=None,

Returns
-------
plotline: :class:`~matplotlib.lines.Line2D` instance
plotline : :class:`~matplotlib.lines.Line2D` instance
x, y plot markers and/or line
caplines:
caplines :
list of error bar cap :class:`~matplotlib.lines.Line2D` instances
Copy link
Member

Choose a reason for hiding this comment

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

same

barlinecols:
barlinecols :
list of :class:`~matplotlib.collections.LineCollection` instances for
the horizontal and vertical error ranges.

Expand All @@ -2789,7 +2790,6 @@ def errorbar(self, x, y, yerr=None, xerr=None,
Example
-------
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.

.. plot:: mpl_examples/statistics/errorbar_demo.py

"""
kwargs = cbook.normalize_kwargs(kwargs, _alias_map)
kwargs.setdefault('zorder', 2)
Expand Down
0