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

Skip to content

Commit dcceac4

Browse files
committed
No backquotes when doc'ing parameter types.
1 parent f2658f9 commit dcceac4

File tree

6 files changed

+35
-40
lines changed

6 files changed

+35
-40
lines changed

lib/matplotlib/animation.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,13 @@ def setup(self, fig, outfile, dpi=None):
200200
201201
Parameters
202202
----------
203-
fig: `matplotlib.figure.Figure` instance
204-
The figure object that contains the information for frames
203+
fig: matplotlib.figure.Figure
204+
The figure object that contains the information for frames.
205205
outfile: string
206-
The filename of the resulting movie file
206+
The filename of the resulting movie file.
207207
dpi: int, optional
208-
The DPI (or resolution) for the file. This controls the size
209-
in pixels of the resulting movie file. Default is ``fig.dpi``.
208+
The DPI (or resolution) for the file. This controls the size in
209+
pixels of the resulting movie file. Default is ``fig.dpi``.
210210
'''
211211

212212
@abc.abstractmethod

lib/matplotlib/axes/_axes.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,7 @@ def legend(self, *args, **kwargs):
353353
corner of the legend in axes coordinates (in which case
354354
``bbox_to_anchor`` will be ignored).
355355
356-
bbox_to_anchor : `matplotlib.transforms.BboxBase` instance \
357-
or tuple of floats
356+
bbox_to_anchor : matplotlib.transforms.BboxBase or Tuple[float, ...]
358357
Specify any arbitrary location for the legend in `bbox_transform`
359358
coordinates (default Axes coordinates).
360359
@@ -2821,11 +2820,11 @@ def errorbar(self, x, y, yerr=None, xerr=None,
28212820
28222821
Returns
28232822
-------
2824-
plotline : `~matplotlib.lines.Line2D` instance
2823+
plotline : matplotlib.lines.Line2D
28252824
x, y plot markers and/or line
2826-
caplines : list of `~matplotlib.lines.Line2D` instances
2825+
caplines : List[matplotlib.lines.Line2D]
28272826
error bar cap
2828-
barlinecols : list of `~matplotlib.collections.LineCollection`
2827+
barlinecols : List[matplotlib.collections.LineCollection]
28292828
horizontal and vertical error ranges.
28302829
28312830
Other Parameters

lib/matplotlib/cm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,12 @@ def __init__(self, norm=None, cmap=None):
181181
182182
Parameters
183183
----------
184-
norm : `matplotlib.colors.Normalize` instance
184+
norm : matplotlib.colors.Normalize
185185
The normalizing object which scales data, typically into the
186186
interval ``[0, 1]``.
187187
If *None*, *norm* defaults to a *colors.Normalize* object which
188188
initializes its scaling based on the first data processed.
189-
cmap : str or `~matplotlib.colors.Colormap` instance
189+
cmap : str or matplotlib.colors.Colormap
190190
The colormap used to map normalized data values to RGBA colors.
191191
"""
192192

lib/matplotlib/colors.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1676,25 +1676,23 @@ def shade(self, data, cmap, norm=None, blend_mode='overlay', vmin=None,
16761676
data : array-like
16771677
A 2d array (or equivalent) of the height values used to generate a
16781678
shaded map.
1679-
cmap : `~matplotlib.colors.Colormap` instance
1679+
cmap : matplotlib.colors.Colormap
16801680
The colormap used to color the *data* array. Note that this must be
1681-
a `~matplotlib.colors.Colormap` instance. For example, rather than
1681+
a `~matplotlib.colors.Colormap` instance. For example, rather than
16821682
passing in `cmap='gist_earth'`, use
1683-
`cmap=plt.get_cmap('gist_earth')` instead.
1684-
norm : `~matplotlib.colors.Normalize` instance, optional
1683+
``cmap=plt.get_cmap('gist_earth')`` instead.
1684+
norm : matplotlib.colors.Normalize, optional
16851685
The normalization used to scale values before colormapping. If
16861686
None, the input will be linearly scaled between its min and max.
16871687
blend_mode : {'hsv', 'overlay', 'soft'} or callable, optional
1688-
The type of blending used to combine the colormapped data
1689-
values with the illumination intensity. Default is
1690-
"overlay". Note that for most topographic surfaces,
1691-
"overlay" or "soft" appear more visually realistic. If a
1692-
user-defined function is supplied, it is expected to
1693-
combine an MxNx3 RGB array of floats (ranging 0 to 1) with
1694-
an MxNx1 hillshade array (also 0 to 1). (Call signature
1695-
`func(rgb, illum, **kwargs)`) Additional kwargs supplied
1696-
to this function will be passed on to the *blend_mode*
1697-
function.
1688+
The type of blending used to combine the colormapped data values
1689+
with the illumination intensity. Default is "overlay". Note that
1690+
for most topographic surfaces, "overlay" or "soft" appear more
1691+
visually realistic. If a user-defined function is supplied, it is
1692+
expected to combine an MxNx3 RGB array of floats (ranging 0 to
1693+
1) with an MxNx1 hillshade array (also 0 to 1). (Call signature
1694+
``func(rgb, illum, **kwargs)``) Additional kwargs supplied to this
1695+
function will be passed on to the *blend_mode* function.
16981696
vmin : scalar or None, optional
16991697
The minimum value used in colormapping *data*. If *None* the
17001698
minimum value in *data* is used. If *norm* is specified, then this

lib/matplotlib/legend_handler.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,33 +81,31 @@ def update_prop(self, legend_handle, orig_handle, legend):
8181
legend_handle.set_clip_path(None)
8282

8383
def adjust_drawing_area(self, legend, orig_handle,
84-
xdescent, ydescent, width, height, fontsize,
85-
):
84+
xdescent, ydescent, width, height, fontsize):
8685
xdescent = xdescent - self._xpad * fontsize
8786
ydescent = ydescent - self._ypad * fontsize
8887
width = width - self._xpad * fontsize
8988
height = height - self._ypad * fontsize
9089
return xdescent, ydescent, width, height
9190

92-
def legend_artist(self, legend, orig_handle,
93-
fontsize, handlebox):
91+
def legend_artist(self, legend, orig_handle, fontsize, handlebox):
9492
"""
9593
Return the artist that this HandlerBase generates for the given
9694
original artist/handle.
9795
9896
Parameters
9997
----------
100-
legend : `matplotlib.legend.Legend` instance
98+
legend : matplotlib.legend.Legend
10199
The legend for which these legend artists are being created.
102-
orig_handle : `matplotlib.artist.Artist` or similar
100+
orig_handle : matplotlib.artist.Artist
103101
The object for which these legend artists are being created.
104-
fontsize : float or int
105-
The fontsize in pixels. The artists being created should
106-
be scaled according to the given fontsize.
107-
handlebox : `matplotlib.offsetbox.OffsetBox` instance
102+
fontsize : float
103+
The fontsize in pixels. The artists being created should be scaled
104+
according to the given fontsize.
105+
handlebox : matplotlib.offsetbox.OffsetBox
108106
The box which has been created to hold this legend entry's
109-
artists. Artists created in the `legend_artist` method must
110-
be added to this handlebox inside this method.
107+
artists. Artists created in the `legend_artist` method must be
108+
added to this handlebox inside this method.
111109
112110
"""
113111
xdescent, ydescent, width, height = self.adjust_drawing_area(

lib/matplotlib/patheffects.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ def __init__(self, path_effects, renderer):
9090
"""
9191
Parameters
9292
----------
93-
path_effects : iterable of `AbstractPathEffect`
93+
path_effects : Iterable[AbstractPathEffect]
9494
The path effects which this renderer represents.
95-
renderer : `matplotlib.backend_bases.RendererBase` instance
95+
renderer : matplotlib.backend_bases.RendererBase
9696
9797
"""
9898
self._path_effects = path_effects

0 commit comments

Comments
 (0)