8000 Simplify rst cross references by omitting the shortener ~ when not needed by timhoffm · Pull Request #10551 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
26 changes: 13 additions & 13 deletions lib/matplotlib/artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ def set_transform(self, t):

Parameters
----------
t : `~.Transform`
.. ACCEPTS: `~.Transform`
t : `.Transform`
.. ACCEPTS: `.Transform`
"""
self._transform = t
self._transformSet = True
Expand Down Expand Up @@ -469,7 +469,7 @@ def get_picker(self):

@cbook.deprecated("2.2", "artist.figure is not None")
def is_figure_set(self):
"""Returns whether the artist is assigned to a `~.Figure`."""
"""Returns whether the artist is assigned to a `.Figure`."""
return self.figure is not None

def get_url(self):
Expand Down Expand Up @@ -596,8 +596,8 @@ def set_path_effects(self, path_effects):

Parameters
----------
path_effects : `~.AbstractPathEffect`
.. ACCEPTS: `~.AbstractPathEffect`
path_effects : `.AbstractPathEffect`
.. ACCEPTS: `.AbstractPathEffect`
"""
self._path_effects = path_effects
self.stale = True
Expand All @@ -606,17 +606,17 @@ def get_path_effects(self):
return self._path_effects

def get_figure(self):
"""Return the `~.Figure` instance the artist belongs to."""
"""Return the `.Figure` instance the artist belongs to."""
return self.figure

def set_figure(self, fig):
"""
Set the `~.Figure` instance the artist belongs to.
Set the `.Figure` instance the artist belongs to.

Parameters
----------
fig : `~.Figure`
.. ACCEPTS: a `~.Figure` instance
fig : `.Figure`
.. ACCEPTS: a `.Figure` instance
"""
# if this is a no-op just return
if self.figure is fig:
Expand All @@ -636,12 +636,12 @@ def set_figure(self, fig):

def set_clip_box(self, clipbox):
"""
Set the artist's clip `~.Bbox`.
Set the artist's clip `.Bbox`.

Parameters
----------
clipbox : `~.Bbox`
.. ACCEPTS: a `~.Bbox` instance
clipbox : `.Bbox`
.. ACCEPTS: a `.Bbox` instance
"""
self.clipbox = clipbox
self.pchanged()
Expand All @@ -662,7 +662,7 @@ def set_clip_path(self, path, transform=None):
this method will set the clipping box to the corresponding rectangle
and set the clipping path to ``None``.

ACCEPTS: [(`~matplotlib.path.Path`, `~.Transform`) | `~.Patch` | None]
ACCEPTS: [(`~matplotlib.path.Path`, `.Transform`) | `.Patch` | None]
"""
from matplotlib.patches import Patch, Rectangle

Expand Down
64 changes: 32 additions & 32 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def legend(self, *args, **kwargs):
Parameters
----------

handles : sequence of `~.Artist`, optional
handles : sequence of `.Artist`, optional
A list of Artists (lines, patches) to be added to the legend.
Use this together with *labels*, if you need full control on what
is shown in the legend and the automatic mechanism described above
Expand Down Expand Up @@ -387,7 +387,7 @@ def legend(self, *args, **kwargs):
corner of the legend in axes coordinates (in which case
``bbox_to_anchor`` will be ignored).

bbox_to_anchor : `~.BboxBase` or pair of floats
bbox_to_anchor : `.BboxBase` or pair of floats
Specify any arbitrary location for the legend in `bbox_transform`
coordinates (default Axes coordinates).

Expand All @@ -412,13 +412,13 @@ def legend(self, *args, **kwargs):

numpoints : None or int
The number of marker points in the legend when creating a legend
entry for a `~.Line2D` (line).
entry for a `.Line2D` (line).
Default is ``None``, which will take the value from
:rc:`legend.numpoints`.

scatterpoints : None or int
The number of marker points in the legend when creating
a legend entry for a `~. 8000 PathCollection` (scatter plot).
a legend entry for a `.PathCollection` (scatter plot).
Default is ``None``, which will take the value from
:rc:`legend.scatterpoints`.

Expand Down Expand Up @@ -1306,7 +1306,7 @@ def plot(self, *args, **kwargs):
>>> plot(y) # plot y using x as index array 0..N-1
>>> plot(y, 'r+') # ditto, but with red plusses

You can use `~.Line2D` properties as keyword arguments for more
You can use `.Line2D` properties as keyword arguments for more
control on the appearance. Line properties and *fmt* can be mixed.
The following two calls yield identical results:

Expand Down Expand Up @@ -1404,7 +1404,7 @@ def plot(self, *args, **kwargs):
These parameters determined if the view limits are adapted to
the data limits. The values are passed on to `autoscale_view`.

**kwargs : `~.Line2D` properties, optional
**kwargs : `.Line2D` properties, optional
*kwargs* are used to specify properties like a line label (for
auto legends), linewidth, antialiasing, marker face color.
Example::
Expand All @@ -1415,14 +1415,14 @@ def plot(self, *args, **kwargs):
If you make multiple lines with one plot command, the kwargs
apply to all those lines.

Here is a list of available `~.Line2D` properties:
Here is a list of available `.Line2D` properties:

%(Line2D)s

Returns
-------
lines
A list of `~.Line2D` objects that were added.
A list of `.Line2D` objects that were added.


See Also
Expand Down Expand Up @@ -1801,12 +1801,12 @@ def acorr(self, x, **kwargs):
lag vector.
c : array (length ``2*maxlags+1``)
auto correlation vector.
line : `~.LineCollection` or `~.Line2D`
`~.Artist` added to the axes of the correlation.
line : `.LineCollection` or `.Line2D`
`.Artist` added to the axes of the correlation.

`~.LineCollection` if *usevlines* is True
`~.Line2D` if *usevlines* is False
b : `~.Line2D` or None
`.LineCollection` if *usevlines* is True
`.Line2D` if *usevlines* is False
b : `.Line2D` or None
Horizontal line at 0 if *usevlines* is True
None *usevlines* is False

Expand Down Expand Up @@ -1863,12 +1863,12 @@ def xcorr(self, x, y, normed=True, detrend=mlab.detrend_none,
lag vector.
c : array (length ``2*maxlags+1``)
auto correlation vector.
line : `~.LineCollection` or `~.Line2D`
`~.Artist` added to the axes of the correlation
line : `.LineCollection` or `.Line2D`
`.Artist` added to the axes of the correlation

`~.LineCollection` if *usevlines* is True
`~.Line2D` if *usevlines* is False
b : `~.Line2D` or None
`.LineCollection` if *usevlines* is True
`.Line2D` if *usevlines* is False
b : `.Line2D` or None
Horizontal line at 0 if *usevlines* is True
None *usevlines* is False

Expand Down Expand Up @@ -2050,7 +2050,7 @@ def bar(self, *args, **kwargs):

Returns
-------
`~.BarContainer`
`.BarContainer`
Container with all the bars and optionally errorbars.

Other Parameters
Expand Down Expand Up @@ -2368,7 +2368,7 @@ def barh(self, *args, **kwargs):

Returns
-------
`~.BarContainer`
`.BarContainer`
Container with all the bars and optionally errorbars.

Other Parameters
Expand Down Expand Up @@ -2486,7 +2486,7 @@ def broken_barh(self, xranges, yrange, **kwargs):

Other Parameters
----------------
**kwargs : :class:`~.BrokenBarHCollection` properties
**kwargs : :class:`.BrokenBarHCollection` properties

Each *kwarg* can be either a single argument applying to all
rectangles, e.g.::
Expand Down Expand Up @@ -2980,7 +2980,7 @@ def errorbar(self, x, y, yerr=None, xerr=None,
- *None*: No errorbar.

fmt : plot format string, optional, default: ''
The format for the data points / data lines. See `~.plot` for
The format for the data points / data lines. See `.plot` for
details.

Use 'none' (case insensitive) to plot errorbars without any data
Expand Down Expand Up @@ -3050,7 +3050,7 @@ def errorbar(self, x, y, yerr=None, xerr=None,
property names, *markerfacecolor*, *markeredgecolor*, *markersize*
and *markeredgewidth*.

Valid kwargs for the marker properties are `~.Lines2D` properties:
Valid kwargs for the marker properties are `.Lines2D` properties:

%(Line2D)s

Expand Down Expand Up @@ -4104,7 +4104,7 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
``image.cmap``.

norm : `~matplotlib.colors.Normalize`, optional, default: None
A `~.Normalize` instance is used to scale luminance data to 0, 1.
A `.Normalize` instance is used to scale luminance data to 0, 1.
*norm* is only used if *c* is an array of floats. If *None*, use
the default `.colors.Normalize`.

Expand Down Expand Up @@ -5028,15 +5028,15 @@ def fill_between(self, x, y1, y2=0, where=None, interpolate=False,
Other Parameters
----------------
**kwargs
All other keyword arguments are passed on to `~.PolyCollection`.
They control the `~.Polygon` properties:
All other keyword arguments are passed on to `.PolyCollection`.
They control the `.Polygon` properties:

%(PolyCollection)s

Returns
-------
`~.PolyCollection`
A `~.PolyCollection` containing the plotted polygons.
`.PolyCollection`
A `.PolyCollection` containing the plotted polygons.

See Also
--------
Expand Down Expand Up @@ -5212,15 +5212,15 @@ def fill_betweenx(self, y, x1, x2=0, where=None,
Other Parameters
----------------
**kwargs
All other keyword arguments are passed on to `~.PolyCollection`.
They control the `~.Polygon` properties:
All other keyword arguments are passed on to `.PolyCollection`.
They control the `.Polygon` properties:

%(PolyCollection)s

Returns
-------
`~.PolyCollection`
A `~.PolyCollection` containing the plotted polygons.
`.PolyCollection`
A `.PolyCollection` containing the plotted polygons.

See Also
--------
Expand Down
6 changes: 3 additions & 3 deletions lib/matplotlib/axes/_base.py
< 67DE td id="diff-eab8def55235f317e1ea06840d82467044586af2a7f9ec994356a14f70509b72R632" data-line-number="632" class="blob-num blob-num-context js-linkable-line-number js-blob-rnum">
Original file line number Diff line number Diff line change
Expand Up @@ -625,13 +625,13 @@ def _init_axis(self):

def set_figure(self, fig):
"""
Set the `~.Figure` for this `~.Axes`.
Set the `.Figure` for this `.Axes`.

.. ACCEPTS: `~.Figure`
.. ACCEPTS: `.Figure`

Parameters
----------
fig : `~.Figure`
fig : `.Figure`
"""
martist.Artist.set_figure(self, fig)

Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/cbook/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ def to_filehandle(fname, flag='rU', return_opened=False, encoding=None):

@contextlib.contextmanager
def open_file_cm(path_or_file, mode="r", encoding=None):
r"""Pass through file objects and context-manage `~.PathLike`\s."""
r"""Pass through file objects and context-manage `.PathLike`\s."""
fh, opened = to_filehandle(path_or_file, mode, True, encoding)
if opened:
with fh:
Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/cm.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,11 @@ def set_cmap(self, cmap):
def set_norm(self, norm):
"""Set the normalization instance.

.. ACCEPTS: `~.Normalize`
.. ACCEPTS: `.Normalize`

Parameters
----------
norm : `~.Normalize`
norm : `.Normalize`
"""
if norm is None:
norm = colors.Normalize()
Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,10 @@ def _dt64_to_ordinalf(d):
def _from_ordinalf(x, tz=None):
"""
Convert Gregorian float of the date, preserving hours, minutes,
seconds and microseconds. Return value is a `~.datetime`.
seconds and microseconds. Return value is a `.datetime`.

The input date *x* is a float in ordinal days at UTC, and the output will
be the specified `~.datetime` object corresponding to that time in
be the specified `.datetime` object corresponding to that time in
timezone *tz*, or if *tz* is ``None``, in the timezone specified in
:rc:`timezone`.
"""
Expand Down
Loading
0