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

Skip to content

rst markup simplification #9166

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

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
More rst markup fixes.
  • Loading branch information
anntzer committed Sep 8, 2017
commit 0c16002cccf4bb7c726a3399a79dcc38d6f06d2b
2 changes: 1 addition & 1 deletion lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6802,7 +6802,7 @@ def magnitude_spectrum(self, x, Fs=None, Fc=None, window=None,
See Also
--------
psd
`psd` plots the power spectral density.`.
`psd` plots the power spectral density.

angle_spectrum
`angle_spectrum` plots the angles of the corresponding frequencies.
Expand Down
27 changes: 14 additions & 13 deletions lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,24 +429,23 @@ def __init__(self, fig, rect,
**kwargs
):
"""
Build an `Axes` instance in
`~matplotlib.figure.Figure` *fig* with
*rect=[left, bottom, width, height]* in
`~matplotlib.figure.Figure` coordinates
Build an `Axes` instance in `~matplotlib.figure.Figure` *fig* with
*rect=[left, bottom, width, height]* in `~matplotlib.figure.Figure`
coordinates

Optional keyword arguments:

================ =========================================
Keyword Description
================ =========================================
*adjustable* [ 'box' | 'datalim' | 'box-forced']
*adjustable* [ 'box' | 'datalim' | 'box-forced' ]
*alpha* float: the alpha transparency (can be None)
*anchor* [ 'C', 'SW', 'S', 'SE', 'E', 'NE', 'N',
'NW', 'W' ]
*aspect* [ 'auto' | 'equal' | aspect_ratio ]
*autoscale_on* [ *True* | *False* ] whether or not to
autoscale the *viewlim*
*axisbelow* [ *True* | *False* | 'line'] draw the grids
*axisbelow* [ *True* | *False* | 'line' ] draw the grids
and ticks below or above most other artists,
or below lines but above patches
*cursor_props* a (*float*, *color*) tuple
Expand All @@ -458,11 +457,11 @@ def __init__(self, fig, rect,
*navigate_mode* [ 'PAN' | 'ZOOM' | None ] the navigation
toolbar button status
*position* [left, bottom, width, height] in
class:`~matplotlib.figure.Figure` coords
*sharex* an class:`~matplotlib.axes.Axes` instance
to share the x-axis with
*sharey* an class:`~matplotlib.axes.Axes` instance
to share the y-axis with
`~matplotlib.figure.Figure` coords
*sharex* an `~matplotlib.axes.Axes` instance to share the
x-axis with
*sharey* an `~matplotlib.axes.Axes` instance to share the
y-axis with
*title* the title string
*visible* [ *True* | *False* ] whether the axes is
visible
Expand Down Expand Up @@ -617,9 +616,11 @@ def _init_axis(self):

def set_figure(self, fig):
"""
Set the class:`~matplotlib.axes.Axes` figure
Set the `~matplotlib.axes.Axes` figure.

accepts a class:`~matplotlib.figure.Figure` instance
Parameters
----------
fig : matplotlib.figure.Figure
"""
martist.Artist.set_figure(self, fig)

Expand Down
9 changes: 4 additions & 5 deletions lib/matplotlib/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -1595,6 +1595,7 @@ def hillshade(self, elevation, vert_exag=1, dx=1, dy=1, fraction=1.):
full illumination or shadow (and clipping any values that move
beyond 0 or 1). Note that this is not visually or mathematically
the same as vertical exaggeration.

Returns
-------
intensity : ndarray
Expand Down Expand Up @@ -1946,9 +1947,8 @@ def from_levels_and_colors(levels, colors, extend='neither'):
Parameters
----------
levels : sequence of numbers
The quantization levels used to construct the `BoundaryNorm`.
Values ``v`` are quantizized to level ``i`` if
``lev[i] <= v < lev[i+1]``.
The quantization levels used to construct the `BoundaryNorm`. Values
``v`` are quantizized to level ``i`` if ``lev[i] <= v < lev[i+1]``.
colors : sequence of colors
The fill color to use for each level. If `extend` is "neither" there
must be ``n_level - 1`` colors. For an `extend` of "min" or "max" add
Expand All @@ -1959,8 +1959,7 @@ def from_levels_and_colors(levels, colors, extend='neither'):

Returns
-------
(cmap, norm) : tuple containing a `Colormap` and a \
`Normalize` instance
(cmap, norm) : tuple of a `Colormap` and a `Normalize` instance
"""
colors_i0 = 0
colors_i1 = None
Expand Down
8 changes: 5 additions & 3 deletions lib/matplotlib/font_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,12 @@ def ttfFontProperty(font):

def afmFontProperty(fontpath, font):
"""
A function for populating a `FontKey` instance by
extracting information from the AFM font file.
Populate a `FontKey` instance with information from the AFM font file.

*font* is a class:`AFM` instance.
Parameters
----------
fontpath : str
font : AFM
"""

name = font.get_familyname()
Expand Down
6 changes: 4 additions & 2 deletions lib/matplotlib/offsetbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,11 @@ def __setstate__(self, state):

def set_figure(self, fig):
"""
Set the figure
Set the figure.

accepts a class:`~matplotlib.figure.Figure` instance
Parameters
----------
fig : matplotlib.figure.Figure
"""
martist.Artist.set_figure(self, fig)
for c in self.get_children():
Expand Down
19 changes: 9 additions & 10 deletions lib/matplotlib/spines.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,19 @@ class Spine(mpatches.Patch):
"""an axis spine -- the line noting the data area boundaries

Spines are the lines connecting the axis tick marks and noting the
boundaries of the data area. They can be placed at arbitrary
positions. See function:`~matplotlib.spines.Spine.set_position`
for more information.
boundaries of the data area. They can be placed at arbitrary positions. See
`~matplotlib.spines.Spine.set_position` for more information.

The default position is ``('outward',0)``.

Spines are subclasses of class:`~matplotlib.patches.Patch`, and
inherit much of their behavior.
Spines are subclasses of `~matplotlib.patches.Patch`, and inherit much of
their behavior.

Spines draw a line, a circle, or an arc depending if
function:`~matplotlib.spines.Spine.set_patch_line`,
function:`~matplotlib.spines.Spine.set_patch_circle`, or
function:`~matplotlib.spines.Spine.set_patch_arc` has been called.
Line-like is the default.
Spines draw a line, a circle, or an arc depending
if `~matplotlib.spines.Spine.set_patch_line`,
`~matplotlib.spines.Spine.set_patch_circle`, or
`~matplotlib.spines.Spine.set_patch_arc` has been called. Line-like is the
default.

"""
def __str__(self):
Expand Down
11 changes: 6 additions & 5 deletions lib/matplotlib/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1637,13 +1637,14 @@ class TransformWrapper(Transform):

def __init__(self, child):
"""
*child*: A class:`Transform` instance. This child may later
be replaced with `set`.
Parameters
----------
child : Transform
This child may later be replaced with `set`.
"""
if not isinstance(child, Transform):
msg = ("'child' must be an instance of"
" 'matplotlib.transform.Transform'")
raise ValueError(msg)
raise ValueError("'child' must be an instance of "
"'matplotlib.transform.Transform'")
self._init(child)
self.set_children(child)

Expand Down