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

Skip to content

Commit 9940416

Browse files
authored
Merge pull request #26214 from tacaswell/auto-backport-of-pr-26186-on-v3.7.x
Auto backport of pr 26186 on v3.7.x
2 parents 404fc0e + 23a5bbb commit 9940416

28 files changed

+110
-103
lines changed

lib/matplotlib/artist.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ def contains(self, mouseevent):
490490
491491
Parameters
492492
----------
493-
mouseevent : `matplotlib.backend_bases.MouseEvent`
493+
mouseevent : `~matplotlib.backend_bases.MouseEvent`
494494
495495
Returns
496496
-------
@@ -781,7 +781,7 @@ def set_clip_path(self, path, transform=None):
781781
782782
Parameters
783783
----------
784-
path : `.Patch` or `.Path` or `.TransformedPath` or None
784+
path : `~matplotlib.patches.Patch` or `.Path` or `.TransformedPath` or None
785785
The clip path. If given a `.Path`, *transform* must be provided as
786786
well. If *None*, a previously set clip path is removed.
787787
transform : `~matplotlib.transforms.Transform`, optional
@@ -1307,7 +1307,7 @@ def get_cursor_data(self, event):
13071307
13081308
Parameters
13091309
----------
1310-
event : `matplotlib.backend_bases.MouseEvent`
1310+
event : `~matplotlib.backend_bases.MouseEvent`
13111311
13121312
See Also
13131313
--------
@@ -1721,7 +1721,7 @@ def getp(obj, property=None):
17211721
17221722
Parameters
17231723
----------
1724-
obj : `.Artist`
1724+
obj : `~matplotlib.artist.Artist`
17251725
The queried artist; e.g., a `.Line2D`, a `.Text`, or an `~.axes.Axes`.
17261726
17271727
property : str or None, default: None
@@ -1760,7 +1760,7 @@ def setp(obj, *args, file=None, **kwargs):
17601760
17611761
Parameters
17621762
----------
1763-
obj : `.Artist` or list of `.Artist`
1763+
obj : `~matplotlib.artist.Artist` or list of `.Artist`
17641764
The artist(s) whose properties are being set or queried. When setting
17651765
properties, all artists are affected; when querying the allowed values,
17661766
only the first instance in the sequence is queried.

lib/matplotlib/axes/_axes.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def set_title(self, label, fontdict=None, loc=None, pad=None, *, y=None,
143143
144144
Other Parameters
145145
----------------
146-
**kwargs : `.Text` properties
146+
**kwargs : `~matplotlib.text.Text` properties
147147
Other keyword arguments are text properties, see `.Text` for a list
148148
of valid text properties.
149149
"""
@@ -1574,7 +1574,7 @@ def plot(self, *args, scalex=True, scaley=True, data=None, **kwargs):
15741574
data limits. The values are passed on to
15751575
`~.axes.Axes.autoscale_view`.
15761576
1577-
**kwargs : `.Line2D` properties, optional
1577+
**kwargs : `~matplotlib.lines.Line2D` properties, optional
15781578
*kwargs* are used to specify properties like a line label (for
15791579
auto legends), linewidth, antialiasing, marker face color.
15801580
Example::
@@ -1966,13 +1966,13 @@ def acorr(self, x, **kwargs):
19661966
19671967
- `.LineCollection` if *usevlines* is True.
19681968
- `.Line2D` if *usevlines* is False.
1969-
b : `.Line2D` or None
1969+
b : `~matplotlib.lines.Line2D` or None
19701970
Horizontal line at 0 if *usevlines* is True
19711971
None *usevlines* is False.
19721972
19731973
Other Parameters
19741974
----------------
1975-
linestyle : `.Line2D` property, optional
1975+
linestyle : `~matplotlib.lines.Line2D` property, optional
19761976
The linestyle for plotting the data points.
19771977
Only used if *usevlines* is ``False``.
19781978
@@ -2043,13 +2043,13 @@ def xcorr(self, x, y, normed=True, detrend=mlab.detrend_none,
20432043
20442044
- `.LineCollection` if *usevlines* is True.
20452045
- `.Line2D` if *usevlines* is False.
2046-
b : `.Line2D` or None
2046+
b : `~matplotlib.lines.Line2D` or None
20472047
Horizontal line at 0 if *usevlines* is True
20482048
None *usevlines* is False.
20492049
20502050
Other Parameters
20512051
----------------
2052-
linestyle : `.Line2D` property, optional
2052+
linestyle : `~matplotlib.lines.Line2D` property, optional
20532053
The linestyle for plotting the data points.
20542054
Only used if *usevlines* is ``False``.
20552055
@@ -3425,8 +3425,10 @@ def errorbar(self, x, y, yerr=None, xerr=None,
34253425
`.ErrorbarContainer`
34263426
The container contains:
34273427
3428-
- plotline: `.Line2D` instance of x, y plot markers and/or line.
3429-
- caplines: A tuple of `.Line2D` instances of the error bar caps.
3428+
- plotline: `~matplotlib.lines.Line2D` instance of x, y plot markers
3429+
and/or line.
3430+
- caplines: A tuple of `~matplotlib.lines.Line2D` instances of the error
3431+
bar caps.
34303432
- barlinecols: A tuple of `.LineCollection` with the horizontal and
34313433
vertical error ranges.
34323434
@@ -6984,7 +6986,7 @@ def stairs(self, values, edges=None, *,
69846986
69856987
Returns
69866988
-------
6987-
StepPatch : `matplotlib.patches.StepPatch`
6989+
StepPatch : `~matplotlib.patches.StepPatch`
69886990
69896991
Other Parameters
69906992
----------------

lib/matplotlib/axes/_base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ def __init__(self, fig,
604604
being created. Finally, ``*args`` can also directly be a
605605
`.SubplotSpec` instance.
606606
607-
sharex, sharey : `~.axes.Axes`, optional
607+
sharex, sharey : `~matplotlib.axes.Axes`, optional
608608
The x- or y-`~.matplotlib.axis` is shared with the x- or y-axis in
609609
the input `~.axes.Axes`.
610610
@@ -3172,7 +3172,7 @@ def grid(self, visible=None, which='major', axis='both', **kwargs):
31723172
axis : {'both', 'x', 'y'}, optional
31733173
The axis to apply the changes on.
31743174
3175-
**kwargs : `.Line2D` properties
3175+
**kwargs : `~matplotlib.lines.Line2D` properties
31763176
Define the line properties of the grid, e.g.::
31773177
31783178
grid(color='r', linestyle='-', linewidth=2)
@@ -3438,7 +3438,7 @@ def set_xlabel(self, xlabel, fontdict=None, labelpad=None, *,
34383438
34393439
Other Parameters
34403440
----------------
3441-
**kwargs : `.Text` properties
3441+
**kwargs : `~matplotlib.text.Text` properties
34423442
`.Text` properties control the appearance of the label.
34433443
34443444
See Also
@@ -3687,7 +3687,7 @@ def set_ylabel(self, ylabel, fontdict=None, labelpad=None, *,
36873687
36883688
Other Parameters
36893689
----------------
3690-
**kwargs : `.Text` properties
3690+
**kwargs : `~matplotlib.text.Text` properties
36913691
`.Text` properties control the appearance of the label.
36923692
36933693
See Also

lib/matplotlib/axis.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ class Tick(martist.Artist):
4343
4444
Attributes
4545
----------
46-
tick1line : `.Line2D`
46+
tick1line : `~matplotlib.lines.Line2D`
4747
The left/bottom tick marker.
48-
tick2line : `.Line2D`
48+
tick2line : `~matplotlib.lines.Line2D`
4949
The right/top tick marker.
50-
gridline : `.Line2D`
50+
gridline : `~matplotlib.lines.Line2D`
5151
The grid line associated with the label position.
52-
label1 : `.Text`
52+
label1 : `~matplotlib.text.Text`
5353
The left/bottom tick label.
54-
label2 : `.Text`
54+
label2 : `~matplotlib.text.Text`
5555
The right/top tick label.
5656
5757
"""
@@ -534,9 +534,9 @@ class Ticker:
534534
535535
Attributes
536536
----------
537-
locator : `matplotlib.ticker.Locator` subclass
537+
locator : `~matplotlib.ticker.Locator` subclass
538538
Determines the positions of the ticks.
539-
formatter : `matplotlib.ticker.Formatter` subclass
539+
formatter : `~matplotlib.ticker.Formatter` subclass
540540
Determines the format of the tick labels.
541541
"""
542542

@@ -609,20 +609,20 @@ class Axis(martist.Artist):
609609
----------
610610
isDefault_label : bool
611611
612-
axes : `matplotlib.axes.Axes`
612+
axes : `~matplotlib.axes.Axes`
613613
The `~.axes.Axes` to which the Axis belongs.
614-
major : `matplotlib.axis.Ticker`
614+
major : `~matplotlib.axis.Ticker`
615615
Determines the major tick positions and their label format.
616-
minor : `matplotlib.axis.Ticker`
616+
minor : `~matplotlib.axis.Ticker`
617617
Determines the minor tick positions and their label format.
618-
callbacks : `matplotlib.cbook.CallbackRegistry`
618+
callbacks : `~matplotlib.cbook.CallbackRegistry`
619619
620-
label : `.Text`
620+
label : `~matplotlib.text.Text`
621621
The axis label.
622622
labelpad : float
623623
The distance between the axis label and the tick labels.
624624
Defaults to :rc:`axes.labelpad` = 4.
625-
offsetText : `.Text`
625+
offsetText : `~matplotlib.text.Text`
626626
A `.Text` object containing the data offset of the ticks (if any).
627627
pickradius : float
628628
The acceptance radius for containment tests. See also `.Axis.contains`.
@@ -645,7 +645,7 @@ def __init__(self, axes, pickradius=15):
645645
"""
646646
Parameters
647647
----------
648-
axes : `matplotlib.axes.Axes`
648+
axes : `~matplotlib.axes.Axes`
649649
The `~.axes.Axes` to which the created Axis belongs.
650650
pickradius : float
651651
The acceptance radius for containment tests. See also
@@ -1634,7 +1634,7 @@ def grid(self, visible=None, which='major', **kwargs):
16341634
which : {'major', 'minor', 'both'}
16351635
The grid lines to apply the changes on.
16361636
1637-
**kwargs : `.Line2D` properties
1637+
**kwargs : `~matplotlib.lines.Line2D` properties
16381638
Define the line properties of the grid, e.g.::
16391639
16401640
grid(color='r', linestyle='-', linewidth=2)

lib/matplotlib/backend_bases.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,9 @@ def draw_markers(self, gc, marker_path, marker_trans, path,
207207
----------
208208
gc : `.GraphicsContextBase`
209209
The graphics context.
210-
marker_trans : `matplotlib.transforms.Transform`
210+
marker_trans : `~matplotlib.transforms.Transform`
211211
An affine transform applied to the marker.
212-
trans : `matplotlib.transforms.Transform`
212+
trans : `~matplotlib.transforms.Transform`
213213
An affine transform applied to the path.
214214
"""
215215
for vertices, codes in path.iter_segments(trans, simplify=False):
@@ -299,7 +299,7 @@ def draw_gouraud_triangle(self, gc, points, colors, transform):
299299
Array of (x, y) points for the triangle.
300300
colors : (3, 4) array-like
301301
RGBA colors for each point of the triangle.
302-
transform : `matplotlib.transforms.Transform`
302+
transform : `~matplotlib.transforms.Transform`
303303
An affine transform to apply to the points.
304304
"""
305305
raise NotImplementedError
@@ -317,7 +317,7 @@ def draw_gouraud_triangles(self, gc, triangles_array, colors_array,
317317
Array of *N* (x, y) points for the triangles.
318318
colors_array : (N, 3, 4) array-like
319319
Array of *N* RGBA colors for each point of the triangles.
320-
transform : `matplotlib.transforms.Transform`
320+
transform : `~matplotlib.transforms.Transform`
321321
An affine transform to apply to the points.
322322
"""
323323
raise NotImplementedError
@@ -521,7 +521,7 @@ def draw_tex(self, gc, x, y, s, prop, angle, *, mtext=None):
521521
The font properties.
522522
angle : float
523523
The rotation angle in degrees anti-clockwise.
524-
mtext : `matplotlib.text.Text`
524+
mtext : `~matplotlib.text.Text`
525525
The original text object to be rendered.
526526
"""
527527
self._draw_text_as_path(gc, x, y, s, prop, angle, ismath="TeX")
@@ -546,7 +546,7 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
546546
The rotation angle in degrees anti-clockwise.
547547
ismath : bool or "TeX"
548548
If True, use mathtext parser. If "TeX", use tex for rendering.
549-
mtext : `matplotlib.text.Text`
549+
mtext : `~matplotlib.text.Text`
550550
The original text object to be rendered.
551551
552552
Notes
@@ -1325,7 +1325,7 @@ class LocationEvent(Event):
13251325
----------
13261326
x, y : int or None
13271327
Event location in pixels from bottom left of canvas.
1328-
inaxes : `~.axes.Axes` or None
1328+
inaxes : `~matplotlib.axes.Axes` or None
13291329
The `~.axes.Axes` instance over which the mouse is, if any.
13301330
xdata, ydata : float or None
13311331
Data coordinates of the mouse within *inaxes*, or *None* if the mouse
@@ -1465,7 +1465,7 @@ class PickEvent(Event):
14651465
----------
14661466
mouseevent : `MouseEvent`
14671467
The mouse event that generated the pick.
1468-
artist : `matplotlib.artist.Artist`
1468+
artist : `~matplotlib.artist.Artist`
14691469
The picked artist. Note that artists are not pickable by default
14701470
(see `.Artist.set_picker`).
14711471
other
@@ -1630,7 +1630,7 @@ class FigureCanvasBase:
16301630
16311631
Attributes
16321632
----------
1633-
figure : `matplotlib.figure.Figure`
1633+
figure : `~matplotlib.figure.Figure`
16341634
A high-level figure instance.
16351635
"""
16361636

lib/matplotlib/backends/backend_mixed.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ def __init__(self, figure, width, height, dpi, vector_renderer,
1919
"""
2020
Parameters
2121
----------
22-
figure : `matplotlib.figure.Figure`
22+
figure : `~matplotlib.figure.Figure`
2323
The figure instance.
2424
width : scalar
2525
The width of the canvas in logical units
2626
height : scalar
2727
The height of the canvas in logical units
2828
dpi : float
2929
The dpi of the canvas
30-
vector_renderer : `matplotlib.backend_bases.RendererBase`
30+
vector_renderer : `~matplotlib.backend_bases.RendererBase`
3131
An instance of a subclass of
3232
`~matplotlib.backend_bases.RendererBase` that will be used for the
3333
vector drawing.
34-
raster_renderer_class : `matplotlib.backend_bases.RendererBase`
34+
raster_renderer_class : `~matplotlib.backend_bases.RendererBase`
3535
The renderer class to use for the raster drawing. If not provided,
3636
this will use the Agg backend (which is currently the only viable
3737
option anyway.)

lib/matplotlib/backends/backend_pgf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ def __init__(self, figure, fh):
395395
396396
Attributes
397397
----------
398-
figure : `matplotlib.figure.Figure`
398+
figure : `~matplotlib.figure.Figure`
399399
Matplotlib figure to initialize height, width and dpi from.
400400
fh : file-like
401401
File handle for the output of the drawing commands.

lib/matplotlib/backends/backend_template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class methods button_press_event, button_release_event,
159159
160160
Attributes
161161
----------
162-
figure : `matplotlib.figure.Figure`
162+
figure : `~matplotlib.figure.Figure`
163163
A high-level Figure instance
164164
"""
165165

lib/matplotlib/cm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def _get_cmap(name=None, lut=None):
270270
271271
Parameters
272272
----------
273-
name : `matplotlib.colors.Colormap` or str or None, default: None
273+
name : `~matplotlib.colors.Colormap` or str or None, default: None
274274
If a `.Colormap` instance, it will be returned. Otherwise, the name of
275275
a colormap known to Matplotlib, which will be resampled by *lut*. The
276276
default, None, means :rc:`image.cmap`.

lib/matplotlib/colorbar.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,13 +1394,13 @@ def make_axes(parents, location=None, orientation=None, fraction=0.15,
13941394
13951395
Parameters
13961396
----------
1397-
parents : `~.axes.Axes` or iterable or `numpy.ndarray` of `~.axes.Axes`
1397+
parents : `~matplotlib.axes.Axes` or iterable or `numpy.ndarray` of `~.axes.Axes`
13981398
The Axes to use as parents for placing the colorbar.
13991399
%(_make_axes_kw_doc)s
14001400
14011401
Returns
14021402
-------
1403-
cax : `~.axes.Axes`
1403+
cax : `~matplotlib.axes.Axes`
14041404
The child axes.
14051405
kwargs : dict
14061406
The reduced keyword dictionary to be passed when creating the colorbar
@@ -1508,13 +1508,13 @@ def make_axes_gridspec(parent, *, location=None, orientation=None,
15081508
15091509
Parameters
15101510
----------
1511-
parent : `~.axes.Axes`
1511+
parent : `~matplotlib.axes.Axes`
15121512
The Axes to use as parent for placing the colorbar.
15131513
%(_make_axes_kw_doc)s
15141514
15151515
Returns
15161516
-------
1517-
cax : `~.axes.Axes`
1517+
cax : `~matplotlib.axes.Axes`
15181518
The child axes.
15191519
kwargs : dict
15201520
The reduced keyword dictionary to be passed when creating the colorbar

0 commit comments

Comments
 (0)