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

Skip to content

Commit 3bd874b

Browse files
authored
Merge pull request #20303 from timhoffm/doc-tilde
Remove tilde in code links where not necessary
2 parents b12d983 + d397011 commit 3bd874b

26 files changed

+60
-60
lines changed

examples/axes_grid1/inset_locator_demo2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
Inset Locator Demo2
44
===================
55
6-
This Demo shows how to create a zoomed inset via `~.zoomed_inset_axes`.
7-
In the first subplot an `~.AnchoredSizeBar` shows the zoom effect.
6+
This Demo shows how to create a zoomed inset via `.zoomed_inset_axes`.
7+
In the first subplot an `.AnchoredSizeBar` shows the zoom effect.
88
In the second subplot a connection to the region of interest is
9-
created via `~.mark_inset`.
9+
created via `.mark_inset`.
1010
"""
1111

1212
from matplotlib import cbook

examples/lines_bars_and_markers/stem_plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# The parameters *linefmt*, *markerfmt*, and *basefmt* control basic format
2222
# properties of the plot. However, in contrast to `~.pyplot.plot` not all
2323
# properties are configurable via keyword arguments. For more advanced
24-
# control adapt the line objects returned by `~.pyplot`.
24+
# control adapt the line objects returned by `.pyplot`.
2525

2626
markerline, stemlines, baseline = plt.stem(
2727
x, y, linefmt='grey', markerfmt='D', bottom=1.1)

examples/mplot3d/stem3d_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# *linefmt*, *markerfmt*, and *basefmt* control basic format properties of the
2727
# plot. However, in contrast to `~.axes3d.Axes3D.plot` not all properties are
2828
# configurable via keyword arguments. For more advanced control adapt the line
29-
# objects returned by `~.stem3D`.
29+
# objects returned by `.stem3D`.
3030

3131
fig, ax = plt.subplots(subplot_kw=dict(projection='3d'))
3232
markerline, stemlines, baseline = ax.stem(

examples/scales/custom_scale.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Create a custom scale, by implementing the scaling use for latitude data in a
77
Mercator Projection.
88
9-
Unless you are making special use of the `~.Transform` class, you probably
9+
Unless you are making special use of the `.Transform` class, you probably
1010
don't need to use this verbose method, and instead can use `~.scale.FuncScale`
1111
and the ``'function'`` option of `~.Axes.set_xscale` and `~.Axes.set_yscale`.
1212
See the last example in :doc:`/gallery/scales/scales`.

examples/ticks_and_spines/date_concise_formatter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
# =========================================
144144
#
145145
# `.ConciseDateFormatter` doesn't have rcParams entries, but localization
146-
# can be accomplished by passing kwargs to `~.ConciseDateConverter` and
146+
# can be accomplished by passing kwargs to `.ConciseDateConverter` and
147147
# registering the datatypes you will use with the units registry:
148148

149149
import datetime

examples/ticks_and_spines/date_precision_and_epochs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def _reset_epoch_for_tutorial():
6666

6767
#############################################################################
6868
# If a user wants to use modern dates at microsecond precision, they
69-
# can change the epoch using `~.set_epoch`. However, the epoch has to be
69+
# can change the epoch using `.set_epoch`. However, the epoch has to be
7070
# set before any date operations to prevent confusion between different
7171
# epochs. Trying to change the epoch later will raise a `RuntimeError`.
7272

lib/matplotlib/axes/_axes.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,7 +1656,7 @@ def plot_date(self, x, y, fmt='o', tz=None, xdate=True, ydate=False,
16561656
16571657
Returns
16581658
-------
1659-
list of `~.Line2D`
1659+
list of `.Line2D`
16601660
Objects representing the plotted data.
16611661
16621662
Other Parameters
@@ -1726,7 +1726,7 @@ def loglog(self, *args, **kwargs):
17261726
17271727
Returns
17281728
-------
1729-
list of `~.Line2D`
1729+
list of `.Line2D`
17301730
Objects representing the plotted data.
17311731
17321732
Other Parameters
@@ -1779,7 +1779,7 @@ def semilogx(self, *args, **kwargs):
17791779
17801780
Returns
17811781
-------
1782-
list of `~.Line2D`
1782+
list of `.Line2D`
17831783
Objects representing the plotted data.
17841784
17851785
Other Parameters
@@ -1828,7 +1828,7 @@ def semilogy(self, *args, **kwargs):
18281828
18291829
Returns
18301830
-------
1831-
list of `~.Line2D`
1831+
list of `.Line2D`
18321832
Objects representing the plotted data.
18331833
18341834
Other Parameters
@@ -4656,7 +4656,7 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
46564656
46574657
vmin, vmax : float, default: None
46584658
The colorbar range. If *None*, suitable min/max values are
4659-
automatically chosen by the `~.Normalize` instance (defaults to
4659+
automatically chosen by the `.Normalize` instance (defaults to
46604660
the respective min/max values of the bins in case of the default
46614661
linear scaling).
46624662
It is deprecated to use *vmin*/*vmax* when *norm* is given.
@@ -5764,7 +5764,7 @@ def pcolor(self, *args, shading=None, alpha=None, norm=None, cmap=None,
57645764
57655765
vmin, vmax : float, default: None
57665766
The colorbar range. If *None*, suitable min/max values are
5767-
automatically chosen by the `~.Normalize` instance (defaults to
5767+
automatically chosen by the `.Normalize` instance (defaults to
57685768
the respective min/max values of *C* in case of the default linear
57695769
scaling).
57705770
It is deprecated to use *vmin*/*vmax* when *norm* is given.
@@ -5991,7 +5991,7 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
59915991
59925992
vmin, vmax : float, default: None
59935993
The colorbar range. If *None*, suitable min/max values are
5994-
automatically chosen by the `~.Normalize` instance (defaults to
5994+
automatically chosen by the `.Normalize` instance (defaults to
59955995
the respective min/max values of *C* in case of the default linear
59965996
scaling).
59975997
It is deprecated to use *vmin*/*vmax* when *norm* is given.
@@ -6239,7 +6239,7 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
62396239
62406240
vmin, vmax : float, default: None
62416241
The colorbar range. If *None*, suitable min/max values are
6242-
automatically chosen by the `~.Normalize` instance (defaults to
6242+
automatically chosen by the `.Normalize` instance (defaults to
62436243
the respective min/max values of *C* in case of the default linear
62446244
scaling).
62456245
It is deprecated to use *vmin*/*vmax* when *norm* is given.
@@ -6380,7 +6380,7 @@ def clabel(self, CS, levels=None, **kwargs):
63806380
63816381
Parameters
63826382
----------
6383-
CS : `~.ContourSet` instance
6383+
CS : `.ContourSet` instance
63846384
Line contours to label.
63856385
63866386
levels : array-like, optional

lib/matplotlib/axes/_base.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2165,7 +2165,7 @@ def _deprecate_noninstance(self, _name, _types, **kwargs):
21652165

21662166
def add_artist(self, a):
21672167
"""
2168-
Add an `~.Artist` to the Axes; return the artist.
2168+
Add an `.Artist` to the Axes; return the artist.
21692169
21702170
Use `add_artist` only for artists for which there is no dedicated
21712171
"add" method; and if necessary, use a method such as `update_datalim`
@@ -2186,7 +2186,7 @@ def add_artist(self, a):
21862186

21872187
def add_child_axes(self, ax):
21882188
"""
2189-
Add an `~.AxesBase` to the axes' children; return the child axes.
2189+
Add an `.AxesBase` to the axes' children; return the child axes.
21902190
21912191
This is the lowlevel version. See `.axes.Axes.inset_axes`.
21922192
"""
@@ -2204,7 +2204,7 @@ def add_child_axes(self, ax):
22042204

22052205
def add_collection(self, collection, autolim=True):
22062206
"""
2207-
Add a `~.Collection` to the Axes; return the collection.
2207+
Add a `.Collection` to the Axes; return the collection.
22082208
"""
22092209
self._deprecate_noninstance('add_collection', mcoll.Collection,
22102210
collection=collection)
@@ -2238,7 +2238,7 @@ def add_collection(self, collection, autolim=True):
22382238

22392239
def add_image(self, image):
22402240
"""
2241-
Add an `~.AxesImage` to the Axes; return the image.
2241+
Add an `.AxesImage` to the Axes; return the image.
22422242
"""
22432243
self._deprecate_noninstance('add_image', mimage.AxesImage, image=image)
22442244
self._set_artist_props(image)
@@ -2272,7 +2272,7 @@ def add_line(self, line):
22722272

22732273
def _add_text(self, txt):
22742274
"""
2275-
Add a `~.Text` to the Axes; return the text.
2275+
Add a `.Text` to the Axes; return the text.
22762276
"""
22772277
self._deprecate_noninstance('_add_text', mtext.Text, txt=txt)
22782278
self._set_artist_props(txt)
@@ -2327,7 +2327,7 @@ def _update_line_limits(self, line):
23272327

23282328
def add_patch(self, p):
23292329
"""
2330-
Add a `~.Patch` to the Axes; return the patch.
2330+
Add a `.Patch` to the Axes; return the patch.
23312331
"""
23322332
self._deprecate_noninstance('add_patch', mpatches.Patch, p=p)
23332333
self._set_artist_props(p)
@@ -2368,7 +2368,7 @@ def _update_patch_limits(self, patch):
23682368

23692369
def add_table(self, tab):
23702370
"""
2371-
Add a `~.Table` to the Axes; return the table.
2371+
Add a `.Table` to the Axes; return the table.
23722372
"""
23732373
self._deprecate_noninstance('add_table', mtable.Table, tab=tab)
23742374
self._set_artist_props(tab)
@@ -2379,7 +2379,7 @@ def add_table(self, tab):
23792379

23802380
def add_container(self, container):
23812381
"""
2382-
Add a `~.Container` to the axes' containers; return the container.
2382+
Add a `.Container` to the axes' containers; return the container.
23832383
"""
23842384
label = container.get_label()
23852385
if not label:
@@ -2406,7 +2406,7 @@ def relim(self, visible_only=False):
24062406
"""
24072407
Recompute the data limits based on current artists.
24082408
2409-
At present, `~.Collection` instances are not supported.
2409+
At present, `.Collection` instances are not supported.
24102410
24112411
Parameters
24122412
----------

lib/matplotlib/axis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1797,7 +1797,7 @@ def _set_ticklabels(self, labels, fontdict=None, minor=False, **kwargs):
17971797
17981798
Returns
17991799
-------
1800-
list of `~.Text`
1800+
list of `.Text`
18011801
The labels.
18021802
18031803
Other Parameters

lib/matplotlib/backend_bases.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,8 +1464,8 @@ class PickEvent(Event):
14641464
(see `.Artist.set_picker`).
14651465
other
14661466
Additional attributes may be present depending on the type of the
1467-
picked object; e.g., a `~.Line2D` pick may define different extra
1468-
attributes than a `~.PatchCollection` pick.
1467+
picked object; e.g., a `.Line2D` pick may define different extra
1468+
attributes than a `.PatchCollection` pick.
14691469
14701470
Examples
14711471
--------
@@ -1532,7 +1532,7 @@ def __init__(self, name, canvas, key, x=0, y=0, guiEvent=None):
15321532

15331533
def _get_renderer(figure, print_method=None):
15341534
"""
1535-
Get the renderer that would be used to save a `~.Figure`, and cache it on
1535+
Get the renderer that would be used to save a `.Figure`, and cache it on
15361536
the figure.
15371537
15381538
If you need a renderer without any active draw methods use

lib/matplotlib/cbook/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1791,7 +1791,7 @@ class so far, an alias named ``get_alias`` will be defined; the same will
17911791
exception will be raised.
17921792
17931793
The alias map is stored as the ``_alias_map`` attribute on the class and
1794-
can be used by `~.normalize_kwargs` (which assumes that higher priority
1794+
can be used by `.normalize_kwargs` (which assumes that higher priority
17951795
aliases come last).
17961796
"""
17971797
if cls is None: # Return the actual class decorator.

lib/matplotlib/collections.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,8 +1046,8 @@ def legend_elements(self, prop="colors", num="auto",
10461046
Finally, a `~.ticker.Locator` can be provided.
10471047
fmt : str, `~matplotlib.ticker.Formatter`, or None (default)
10481048
The format or formatter to use for the labels. If a string must be
1049-
a valid input for a `~.StrMethodFormatter`. If None (the default),
1050-
use a `~.ScalarFormatter`.
1049+
a valid input for a `.StrMethodFormatter`. If None (the default),
1050+
use a `.ScalarFormatter`.
10511051
func : function, default: ``lambda x: x``
10521052
Function to calculate the labels. Often the size (or color)
10531053
argument to `~.Axes.scatter` will have been pre-processed by the
@@ -1360,7 +1360,7 @@ class LineCollection(Collection):
13601360
Represents a sequence of `.Line2D`\s that should be drawn together.
13611361
13621362
This class extends `.Collection` to represent a sequence of
1363-
`~.Line2D`\s instead of just a sequence of `~.Patch`\s.
1363+
`.Line2D`\s instead of just a sequence of `.Patch`\s.
13641364
Just as in `.Collection`, each property of a *LineCollection* may be either
13651365
a single value or a list of values. This list is then used cyclically for
13661366
each element of the LineCollection, so the property of the ``i``\th element
@@ -1896,7 +1896,7 @@ def set_paths(self):
18961896
@staticmethod
18971897
def convert_mesh_to_paths(tri):
18981898
"""
1899-
Convert a given mesh into a sequence of `~.Path` objects.
1899+
Convert a given mesh into a sequence of `.Path` objects.
19001900
19011901
This function is primarily of use to implementers of backends that do
19021902
not directly support meshes.
@@ -2051,7 +2051,7 @@ def get_datalim(self, transData):
20512051
@staticmethod
20522052
def convert_mesh_to_paths(meshWidth, meshHeight, coordinates):
20532053
"""
2054-
Convert a given mesh into a sequence of `~.Path` objects.
2054+
Convert a given mesh into a sequence of `.Path` objects.
20552055
20562056
This function is primarily of use to implementers of backends that do
20572057
not directly support quadmeshes.

lib/matplotlib/colorbar.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
used with figures containing a single axes or with freely placed axes.
2525
2626
:func:`make_axes_gridspec`
27-
Create a `~.SubplotBase` suitable for a colorbar. This function should
27+
Create a `.SubplotBase` suitable for a colorbar. This function should
2828
be used for adding a colorbar to a `.GridSpec`.
2929
"""
3030

@@ -168,7 +168,7 @@
168168
use_gridspec : bool, optional
169169
If *cax* is ``None``, a new *cax* is created as an instance of Axes. If
170170
*ax* is an instance of Subplot and *use_gridspec* is ``True``, *cax* is
171-
created as an instance of Subplot using the :mod:`~.gridspec` module.
171+
created as an instance of Subplot using the :mod:`.gridspec` module.
172172
173173
Returns
174174
-------
@@ -1453,7 +1453,7 @@ def make_axes(parents, location=None, orientation=None, fraction=0.15,
14531453
def make_axes_gridspec(parent, *, location=None, orientation=None,
14541454
fraction=0.15, shrink=1.0, aspect=20, **kw):
14551455
"""
1456-
Create a `~.SubplotBase` suitable for a colorbar.
1456+
Create a `.SubplotBase` suitable for a colorbar.
14571457
14581458
The axes is placed in the figure of the *parent* axes, by resizing and
14591459
repositioning *parent*.

lib/matplotlib/gridspec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ def update(self, **kwargs):
436436

437437
def get_subplot_params(self, figure=None):
438438
"""
439-
Return the `~.SubplotParams` for the GridSpec.
439+
Return the `.SubplotParams` for the GridSpec.
440440
441441
In order of precedence the values are taken from
442442

lib/matplotlib/legend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def _update_bbox_to_anchor(self, loc_in_canvas):
208208
Whether the legend should be drawn on a patch (frame).
209209
210210
fancybox : bool, default: :rc:`legend.fancybox`
211-
Whether round edges should be enabled around the `~.FancyBboxPatch` which
211+
Whether round edges should be enabled around the `.FancyBboxPatch` which
212212
makes up the legend's background.
213213
214214
shadow : bool, default: :rc:`legend.shadow`

lib/matplotlib/path.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,18 +1045,18 @@ def clip_to_bbox(self, bbox, inside=True):
10451045
def get_path_collection_extents(
10461046
master_transform, paths, transforms, offsets, offset_transform):
10471047
r"""
1048-
Given a sequence of `Path`\s, `~.Transform`\s objects, and offsets, as
1049-
found in a `~.PathCollection`, returns the bounding box that encapsulates
1048+
Given a sequence of `Path`\s, `.Transform`\s objects, and offsets, as
1049+
found in a `.PathCollection`, returns the bounding box that encapsulates
10501050
all of them.
10511051
10521052
Parameters
10531053
----------
1054-
master_transform : `~.Transform`
1054+
master_transform : `.Transform`
10551055
Global transformation applied to all paths.
10561056
paths : list of `Path`
1057-
transforms : list of `~.Affine2D`
1057+
transforms : list of `.Affine2D`
10581058
offsets : (N, 2) array-like
1059-
offset_transform : `~.Affine2D`
1059+
offset_transform : `.Affine2D`
10601060
Transform applied to the offsets before offsetting the path.
10611061
10621062
Notes

lib/matplotlib/patheffects.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
2-
Defines classes for path effects. The path effects are supported in `~.Text`,
3-
`~.Line2D` and `~.Patch`.
2+
Defines classes for path effects. The path effects are supported in `.Text`,
3+
`.Line2D` and `.Patch`.
44
55
.. seealso::
66
:doc:`/tutorials/advanced/patheffects_guide`

lib/matplotlib/projections/polar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,7 @@ def set_thetagrids(self, angles, labels=None, fmt=None, **kwargs):
13251325
Other Parameters
13261326
----------------
13271327
**kwargs
1328-
*kwargs* are optional `~.Text` properties for the labels.
1328+
*kwargs* are optional `.Text` properties for the labels.
13291329
13301330
See Also
13311331
--------
@@ -1377,7 +1377,7 @@ def set_rgrids(self, radii, labels=None, angle=None, fmt=None, **kwargs):
13771377
Other Parameters
13781378
----------------
13791379
**kwargs
1380-
*kwargs* are optional `~.Text` properties for the labels.
1380+
*kwargs* are optional `.Text` properties for the labels.
13811381
13821382
See Also
13831383
--------

0 commit comments

Comments
 (0)