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

Skip to content

Commit 7fe3dd2

Browse files
authored
Merge pull request #12067 from jklymak/doc-moresearchable-Line2Ds
DOC: make Line2D docstring definition easier to find
2 parents 2ae9668 + e7069a7 commit 7fe3dd2

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

doc/devel/documenting_mpl.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ Then in any function accepting `~.Line2D` pass-through ``kwargs``, e.g.,
614614
Some stuff omitted
615615
616616
The kwargs are Line2D properties:
617-
%(Line2D)s
617+
%(_Line2D_docstr)s
618618
619619
kwargs scalex and scaley, if defined, are passed on
620620
to autoscale_view to determine whether the x and y axes are

lib/matplotlib/axes/_axes.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ def axhline(self, y=0, xmin=0, xmax=1, **kwargs):
759759
Valid kwargs are :class:`~matplotlib.lines.Line2D` properties,
760760
with the exception of 'transform':
761761
762-
%(Line2D)s
762+
%(_Line2D_docstr)s
763763
764764
See also
765765
--------
@@ -829,7 +829,7 @@ def axvline(self, x=0, ymin=0, ymax=1, **kwargs):
829829
Valid kwargs are :class:`~matplotlib.lines.Line2D` properties,
830830
with the exception of 'transform':
831831
832-
%(Line2D)s
832+
%(_Line2D_docstr)s
833833
834834
Examples
835835
--------
@@ -1498,7 +1498,7 @@ def plot(self, *args, scalex=True, scaley=True, **kwargs):
14981498
14991499
Here is a list of available `.Line2D` properties:
15001500
1501-
%(Line2D)s
1501+
%(_Line2D_docstr)s
15021502
15031503
Returns
15041504
-------
@@ -1650,7 +1650,7 @@ def plot_date(self, x, y, fmt='o', tz=None, xdate=True, ydate=False,
16501650
Keyword arguments control the :class:`~matplotlib.lines.Line2D`
16511651
properties:
16521652
1653-
%(Line2D)s
1653+
%(_Line2D_docstr)s
16541654
16551655
16561656
See Also
@@ -3015,7 +3015,7 @@ def errorbar(self, x, y, yerr=None, xerr=None,
30153015
30163016
Valid kwargs for the marker properties are `.Lines2D` properties:
30173017
3018-
%(Line2D)s
3018+
%(_Line2D_docstr)s
30193019
30203020
Notes
30213021
-----
@@ -6938,7 +6938,7 @@ def psd(self, x, NFFT=None, Fs=None, Fc=None, detrend=None,
69386938
Keyword arguments control the :class:`~matplotlib.lines.Line2D`
69396939
properties:
69406940
6941-
%(Line2D)s
6941+
%(_Line2D_docstr)s
69426942
69436943
See Also
69446944
--------
@@ -7063,7 +7063,7 @@ def csd(self, x, y, NFFT=None, Fs=None, Fc=None, detrend=None,
70637063
Keyword arguments control the :class:`~matplotlib.lines.Line2D`
70647064
properties:
70657065
7066-
%(Line2D)s
7066+
%(_Line2D_docstr)s
70677067
70687068
See Also
70697069
--------
@@ -7161,7 +7161,7 @@ def magnitude_spectrum(self, x, Fs=None, Fc=None, window=None,
71617161
Keyword arguments control the :class:`~matplotlib.lines.Line2D`
71627162
properties:
71637163
7164-
%(Line2D)s
7164+
%(_Line2D_docstr)s
71657165
71667166
See Also
71677167
--------
@@ -7258,7 +7258,7 @@ def angle_spectrum(self, x, Fs=None, Fc=None, window=None,
72587258
Keyword arguments control the :class:`~matplotlib.lines.Line2D`
72597259
properties:
72607260
7261-
%(Line2D)s
7261+
%(_Line2D_docstr)s
72627262
72637263
See Also
72647264
--------
@@ -7340,7 +7340,7 @@ def phase_spectrum(self, x, Fs=None, Fc=None, window=None,
73407340
Keyword arguments control the :class:`~matplotlib.lines.Line2D`
73417341
properties:
73427342
7343-
%(Line2D)s
7343+
%(_Line2D_docstr)s
73447344
73457345
See Also
73467346
--------
@@ -7419,7 +7419,7 @@ def cohere(self, x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
74197419
Keyword arguments control the :class:`~matplotlib.lines.Line2D`
74207420
properties:
74217421
7422-
%(Line2D)s
7422+
%(_Line2D_docstr)s
74237423
74247424
References
74257425
----------
@@ -7681,7 +7681,7 @@ def spy(self, Z, precision=0, marker=None, markersize=None,
76817681
For the marker style, you can pass any `.Line2D` property except
76827682
for *linestyle*:
76837683
7684-
%(Line2D)s
7684+
%(_Line2D_docstr)s
76857685
"""
76867686
if marker is None and markersize is None and hasattr(Z, 'tocoo'):
76877687
marker = 's'

lib/matplotlib/axes/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2716,7 +2716,7 @@ def grid(self, b=None, which='major', axis='both', **kwargs):
27162716
27172717
Valid *kwargs* are
27182718
2719-
%(Line2D)s
2719+
%(_Line2D_docstr)s
27202720
27212721
Notes
27222722
-----

lib/matplotlib/lines.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def __init__(self, xdata, ydata,
300300
301301
The kwargs are :class:`~matplotlib.lines.Line2D` properties:
302302
303-
%(Line2D)s
303+
%(_Line2D_docstr)s
304304
305305
See :meth:`set_linestyle` for a description of the line styles,
306306
:meth:`set_marker` for a description of the markers, and
@@ -1531,7 +1531,7 @@ def onpick(self, event):
15311531
drawStyles = Line2D.drawStyles
15321532
fillStyles = MarkerStyle.fillstyles
15331533

1534-
docstring.interpd.update(Line2D=artist.kwdoc(Line2D))
1534+
docstring.interpd.update(_Line2D_docstr=artist.kwdoc(Line2D))
15351535

15361536
# You can not set the docstring of an instancemethod,
15371537
# but you can on the underlying function. Go figure.

0 commit comments

Comments
 (0)