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

Skip to content

DOC: make Line2D docstring definition easier to find #12067

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 2 commits into from
Sep 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/devel/documenting_mpl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ Then in any function accepting `~.Line2D` pass-through ``kwargs``, e.g.,
Some stuff omitted

The kwargs are Line2D properties:
%(Line2D)s
%(_Line2D_docstr)s

kwargs scalex and scaley, if defined, are passed on
to autoscale_view to determine whether the x and y axes are
Expand Down
24 changes: 12 additions & 12 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ def axhline(self, y=0, xmin=0, xmax=1, **kwargs):
Valid kwargs are :class:`~matplotlib.lines.Line2D` properties,
with the exception of 'transform':

%(Line2D)s
%(_Line2D_docstr)s

See also
--------
Expand Down Expand Up @@ -829,7 +829,7 @@ def axvline(self, x=0, ymin=0, ymax=1, **kwargs):
Valid kwargs are :class:`~matplotlib.lines.Line2D` properties,
with the exception of 'transform':

%(Line2D)s
%(_Line2D_docstr)s

Examples
--------
Expand Down Expand Up @@ -1498,7 +1498,7 @@ def plot(self, *args, scalex=True, scaley=True, **kwargs):

Here is a list of available `.Line2D` properties:

%(Line2D)s
%(_Line2D_docstr)s

Returns
-------
Expand Down Expand Up @@ -1650,7 +1650,7 @@ def plot_date(self, x, y, fmt='o', tz=None, xdate=True, ydate=False,
Keyword arguments control the :class:`~matplotlib.lines.Line2D`
properties:

%(Line2D)s
%(_Line2D_docstr)s


See Also
Expand Down Expand Up @@ -3015,7 +3015,7 @@ def errorbar(self, x, y, yerr=None, xerr=None,

Valid kwargs for the marker properties are `.Lines2D` properties:

%(Line2D)s
%(_Line2D_docstr)s

Notes
-----
Expand Down Expand Up @@ -6938,7 +6938,7 @@ def psd(self, x, NFFT=None, Fs=None, Fc=None, detrend=None,
Keyword arguments control the :class:`~matplotlib.lines.Line2D`
properties:

%(Line2D)s
%(_Line2D_docstr)s

See Also
--------
Expand Down Expand Up @@ -7063,7 +7063,7 @@ def csd(self, x, y, NFFT=None, Fs=None, Fc=None, detrend=None,
Keyword arguments control the :class:`~matplotlib.lines.Line2D`
properties:

%(Line2D)s
%(_Line2D_docstr)s

See Also
--------
Expand Down Expand Up @@ -7161,7 +7161,7 @@ def magnitude_spectrum(self, x, Fs=None, Fc=None, window=None,
Keyword arguments control the :class:`~matplotlib.lines.Line2D`
properties:

%(Line2D)s
%(_Line2D_docstr)s

See Also
--------
Expand Down Expand Up @@ -7258,7 +7258,7 @@ def angle_spectrum(self, x, Fs=None, Fc=None, window=None,
Keyword arguments control the :class:`~matplotlib.lines.Line2D`
properties:

%(Line2D)s
%(_Line2D_docstr)s

See Also
--------
Expand Down Expand Up @@ -7340,7 +7340,7 @@ def phase_spectrum(self, x, Fs=None, Fc=None, window=None,
Keyword arguments control the :class:`~matplotlib.lines.Line2D`
properties:

%(Line2D)s
%(_Line2D_docstr)s

See Also
--------
Expand Down Expand Up @@ -7419,7 +7419,7 @@ def cohere(self, x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
Keyword arguments control the :class:`~matplotlib.lines.Line2D`
properties:

%(Line2D)s
%(_Line2D_docstr)s

References
----------
Expand Down Expand Up @@ -7681,7 +7681,7 @@ def spy(self, Z, precision=0, marker=None, markersize=None,
For the marker style, you can pass any `.Line2D` property except
for *linestyle*:

%(Line2D)s
%(_Line2D_docstr)s
"""
if marker is None and markersize is None and hasattr(Z, 'tocoo'):
marker = 's'
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2716,7 +2716,7 @@ def grid(self, b=None, which='major', axis='both', **kwargs):

Valid *kwargs* are

%(Line2D)s
%(_Line2D_docstr)s

Notes
-----
Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def __init__(self, xdata, ydata,

The kwargs are :class:`~matplotlib.lines.Line2D` properties:

%(Line2D)s
%(_Line2D_docstr)s

See :meth:`set_linestyle` for a description of the line styles,
:meth:`set_marker` for a description of the markers, and
Expand Down Expand Up @@ -1531,7 +1531,7 @@ def onpick(self, event):
drawStyles = Line2D.drawStyles
fillStyles = MarkerStyle.fillstyles

docstring.interpd.update(Line2D=artist.kwdoc(Line2D))
docstring.interpd.update(_Line2D_docstr=artist.kwdoc(Line2D))

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