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

Skip to content

Commit a6445c9

Browse files
committed
Update documentation example and fix See also
1 parent f35a330 commit a6445c9

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

doc/devel/documenting_mpl.rst

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ An example docstring looks like:
368368

369369
.. code-block:: python
370370
371-
def hlines(self, y, xmin, xmax, colors='k', linestyles='solid',
371+
def hlines(self, y, xmin, xmax, colors=None, linestyles='solid',
372372
label='', **kwargs):
373373
"""
374374
Plot horizontal lines at each *y* from *xmin* to *xmax*.
@@ -382,24 +382,26 @@ An example docstring looks like:
382382
Respective beginning and end of each line. If scalars are
383383
provided, all lines will have the same length.
384384
385-
colors : array-like of colors, default: 'k'
385+
colors : list of colors, default: :rc:`lines.color`
386386
387-
linestyles : {'solid', 'dashed', 'dashdot', 'dotted'}, default: 'solid'
387+
linestyles : {'solid', 'dashed', 'dashdot', 'dotted'}, optional
388388
389389
label : str, default: ''
390390
391391
Returns
392392
-------
393-
lines : `~matplotlib.collections.LineCollection`
393+
`~matplotlib.collections.LineCollection`
394394
395395
Other Parameters
396396
----------------
397-
**kwargs : `~matplotlib.collections.LineCollection` properties
397+
data : indexable object, optional
398+
DATA_PARAMETER_PLACEHOLDER
399+
**kwargs : `~matplotlib.collections.LineCollection` properties.
398400
399-
See also
401+
See Also
400402
--------
401403
vlines : vertical lines
402-
axhline: horizontal line across the axes
404+
axhline : horizontal line across the Axes
403405
"""
404406
405407
See the `~.Axes.hlines` documentation for how this renders.
@@ -566,10 +568,10 @@ effect.
566568
Sphinx automatically links code elements in the definition blocks of ``See
567569
also`` sections. No need to use backticks there::
568570

569-
See also
571+
See Also
570572
--------
571573
vlines : vertical lines
572-
axhline: horizontal line across the axes
574+
axhline : horizontal line across the Axes
573575

574576
Wrapping parameter lists
575577
~~~~~~~~~~~~~~~~~~~~~~~~

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ def hlines(self, y, xmin, xmax, colors=None, linestyles='solid',
10141014
10151015
xmin, xmax : float or array-like
10161016
Respective beginning and end of each line. If scalars are
1017-
provided, all lines will have same length.
1017+
provided, all lines will have the same length.
10181018
10191019
colors : list of colors, default: :rc:`lines.color`
10201020
@@ -1093,7 +1093,7 @@ def vlines(self, x, ymin, ymax, colors=None, linestyles='solid',
10931093
10941094
ymin, ymax : float or array-like
10951095
Respective beginning and end of each line. If scalars are
1096-
provided, all lines will have same length.
1096+
provided, all lines will have the same length.
10971097
10981098
colors : list of colors, default: :rc:`lines.color`
10991099

0 commit comments

Comments
 (0)