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

Skip to content

Commit a4b81b1

Browse files
committed
[Doc] Shorten documentation links
1 parent 7dcc416 commit a4b81b1

File tree

1 file changed

+21
-23
lines changed

1 file changed

+21
-23
lines changed

lib/matplotlib/widgets.py

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
===================
44
55
Widgets that are designed to work for any of the GUI backends.
6-
All of these widgets require you to predefine a `matplotlib.axes.Axes`
6+
All of these widgets require you to predefine an `~.axes.Axes`
77
instance and pass that as the first parameter. Matplotlib doesn't try to
88
be too smart with respect to layout -- you will have to figure out how
99
wide and tall you want your Axes to be to accommodate your widget.
@@ -170,9 +170,9 @@ class Button(AxesWidget):
170170
Attributes
171171
----------
172172
ax
173-
The `matplotlib.axes.Axes` the button renders into.
173+
The `~.axes.Axes` the button renders into.
174174
label
175-
A `matplotlib.text.Text` instance.
175+
A `.Text` instance.
176176
color
177177
The color of the button when not hovering.
178178
hovercolor
@@ -190,7 +190,7 @@ def __init__(self, ax, label, image=None,
190190
The button text.
191191
image : array-like or PIL Image
192192
The image to place in the button, if not *None*. The parameter is
193-
directly forwarded to `~matplotlib.axes.Axes.imshow`.
193+
directly forwarded to `~.axes.Axes.imshow`.
194194
color : color
195195
The color of the button when not activated.
196196
hovercolor : color
@@ -1007,9 +1007,9 @@ class CheckButtons(AxesWidget):
10071007
ax : `~matplotlib.axes.Axes`
10081008
The parent Axes for the widget.
10091009
1010-
labels : list of `.Text`
1010+
labels : list of `~matplotlib.text.Text`
10111011
1012-
rectangles : list of `.Rectangle`
1012+
rectangles : list of `~matplotlib.patches.Rectangle`
10131013
10141014
lines : list of (`.Line2D`, `.Line2D`) pairs
10151015
List of lines for the x's in the checkboxes. These lines exist for
@@ -1019,7 +1019,7 @@ class CheckButtons(AxesWidget):
10191019
def __init__(self, ax, labels, actives=None, *, useblit=True,
10201020
label_props=None, frame_props=None, check_props=None):
10211021
"""
1022-
Add check buttons to `matplotlib.axes.Axes` instance *ax*.
1022+
Add check buttons to `~.axes.Axes` instance *ax*.
10231023
10241024
Parameters
10251025
----------
@@ -1876,16 +1876,16 @@ def circles(self):
18761876

18771877
class SubplotTool(Widget):
18781878
"""
1879-
A tool to adjust the subplot params of a `matplotlib.figure.Figure`.
1879+
A tool to adjust the subplot params of a `.Figure`.
18801880
"""
18811881

18821882
def __init__(self, targetfig, toolfig):
18831883
"""
18841884
Parameters
18851885
----------
1886-
targetfig : `.Figure`
1886+
targetfig : `~matplotlib.figure.Figure`
18871887
The figure instance to adjust.
1888-
toolfig : `.Figure`
1888+
toolfig : `~matplotlib.figure.Figure`
18891889
The figure instance to embed the subplot tool into.
18901890
"""
18911891

@@ -2051,7 +2051,7 @@ class MultiCursor(Widget):
20512051
canvas : object
20522052
This parameter is entirely unused and only kept for back-compatibility.
20532053
2054-
axes : list of `matplotlib.axes.Axes`
2054+
axes : list of `~matplotlib.axes.Axes`
20552055
The `~.axes.Axes` to attach the cursor to.
20562056
20572057
useblit : bool, default: True
@@ -2564,7 +2564,7 @@ class SpanSelector(_SelectorWidget):
25642564
canvas updates. See the tutorial :ref:`blitting` for details.
25652565
25662566
props : dict, default: {'facecolor': 'red', 'alpha': 0.5}
2567-
Dictionary of `matplotlib.patches.Patch` properties.
2567+
Dictionary of `.Patch` properties.
25682568
25692569
onmove_callback : callable with signature ``func(min: float, max: float)``, optional
25702570
Called on mouse move while the span is being selected.
@@ -2578,8 +2578,7 @@ class SpanSelector(_SelectorWidget):
25782578
25792579
handle_props : dict, default: None
25802580
Properties of the handle lines at the edges of the span. Only used
2581-
when *interactive* is True. See `matplotlib.lines.Line2D` for valid
2582-
properties.
2581+
when *interactive* is True. See `.Line2D` for valid properties.
25832582
25842583
grab_range : float, default: 10
25852584
Distance in pixels within which the interactive tool handles can be activated.
@@ -2951,7 +2950,7 @@ class ToolLineHandles:
29512950
direction : {"horizontal", "vertical"}
29522951
Direction of handles, either 'vertical' or 'horizontal'
29532952
line_props : dict, optional
2954-
Additional line properties. See `matplotlib.lines.Line2D`.
2953+
Additional line properties. See `.Line2D`.
29552954
useblit : bool, default: True
29562955
Whether to use blitting for faster drawing (if supported by the
29572956
backend). See the tutorial :ref:`blitting`
@@ -3060,9 +3059,9 @@ class ToolHandles:
30603059
x, y : 1D arrays
30613060
Coordinates of control handles.
30623061
marker : str, default: 'o'
3063-
Shape of marker used to display handle. See `matplotlib.pyplot.plot`.
3062+
Shape of marker used to display handle. See `~.pyplot.plot`.
30643063
marker_props : dict, optional
3065-
Additional marker properties. See `matplotlib.lines.Line2D`.
3064+
Additional marker properties. See `.Line2D`.
30663065
useblit : bool, default: True
30673066
Whether to use blitting for faster drawing (if supported by the
30683067
backend). See the tutorial :ref:`blitting`
@@ -3147,7 +3146,7 @@ def onselect(eclick: MouseEvent, erelease: MouseEvent)
31473146
31483147
props : dict, optional
31493148
Properties with which the __ARTIST_NAME__ is drawn. See
3150-
`matplotlib.patches.Patch` for valid properties.
3149+
`.Patch` for valid properties.
31513150
Default:
31523151
31533152
``dict(facecolor='red', edgecolor='black', alpha=0.2, fill=True)``
@@ -3165,7 +3164,7 @@ def onselect(eclick: MouseEvent, erelease: MouseEvent)
31653164
31663165
handle_props : dict, optional
31673166
Properties with which the interactive handles (marker artists) are
3168-
drawn. See the marker arguments in `matplotlib.lines.Line2D` for valid
3167+
drawn. See the marker arguments in `.Line2D` for valid
31693168
properties. Default values are defined in ``mpl.rcParams`` except for
31703169
the default value of ``markeredgecolor`` which will be the same as the
31713170
``edgecolor`` property in *props*.
@@ -3765,7 +3764,7 @@ def onselect(verts):
37653764
backend). See the tutorial :ref:`blitting`
37663765
for details.
37673766
props : dict, optional
3768-
Properties with which the line is drawn, see `matplotlib.lines.Line2D`
3767+
Properties with which the line is drawn, see `.Line2D`
37693768
for valid properties. Default values are defined in ``mpl.rcParams``.
37703769
button : `.MouseButton` or list of `.MouseButton`, optional
37713770
The mouse buttons used for rectangle selection. Default is ``None``,
@@ -3842,15 +3841,14 @@ class PolygonSelector(_SelectorWidget):
38423841
for details.
38433842
38443843
props : dict, optional
3845-
Properties with which the line is drawn, see `matplotlib.lines.Line2D`
3846-
for valid properties.
3844+
Properties with which the line is drawn, see `.Line2D` for valid properties.
38473845
Default::
38483846
38493847
dict(color='k', linestyle='-', linewidth=2, alpha=0.5)
38503848
38513849
handle_props : dict, optional
38523850
Artist properties for the markers drawn at the vertices of the polygon.
3853-
See the marker arguments in `matplotlib.lines.Line2D` for valid
3851+
See the marker arguments in `.Line2D` for valid
38543852
properties. Default values are defined in ``mpl.rcParams`` except for
38553853
the default value of ``markeredgecolor`` which will be the same as the
38563854
``color`` property in *props*.

0 commit comments

Comments
 (0)