10000 Merge pull request #10551 from timhoffm/simplify-rst-crossref · matplotlib/matplotlib@0aad6fd · GitHub
[go: up one dir, main page]

Skip to content

Commit 0aad6fd

Browse files
authored
Merge pull request #10551 from timhoffm/simplify-rst-crossref
Simplify rst cross references by omitting the shortener ~ when not needed
2 parents 254cdac + 0093fa6 commit 0aad6fd

File tree

16 files changed

+107
-107
lines changed
  • mpl_toolkits/mplot3d
  • tutorials
  • 16 files changed

    +107
    -107
    lines changed

    lib/matplotlib/artist.py

    Lines changed: 13 additions & 13 deletions
    Original file line numberDiff line numberDiff line change
    @@ -306,8 +306,8 @@ def set_transform(self, t):
    306306
    307307
    Parameters
    308308
    ----------
    309-
    t : `~.Transform`
    310-
    .. ACCEPTS: `~.Transform`
    309+
    t : `.Transform`
    310+
    .. ACCEPTS: `.Transform`
    311311
    """
    312312
    self._transform = t
    313313
    self._transformSet = True
    @@ -469,7 +469,7 @@ def get_picker(self):
    469469

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

    475475
    def get_url(self):
    @@ -596,8 +596,8 @@ def set_path_effects(self, path_effects):
    596596
    597597
    Parameters
    598598
    ----------
    599-
    path_effects : `~.AbstractPathEffect`
    600-
    .. ACCEPTS: `~.AbstractPathEffect`
    599+
    path_effects : `.AbstractPathEffect`
    600+
    .. ACCEPTS: `.AbstractPathEffect`
    601601
    """
    602602
    self._path_effects = path_effects
    603603
    self.stale = True
    @@ -606,17 +606,17 @@ def get_path_effects(self):
    606606
    return self._path_effects
    607607

    608608
    def get_figure(self):
    609-
    """Return the `~.Figure` instance the artist belongs to."""
    609+
    """Return the `.Figure` instance the artist belongs to."""
    610610
    return self.figure
    611611

    612612
    def set_figure(self, fig):
    613613
    """
    614-
    Set the `~.Figure` instance the artist belongs to.
    614+
    Set the `.Figure` instance the artist belongs to.
    615615
    616616
    Parameters
    617617
    ----------
    618-
    fig : `~.Figure`
    619-
    .. ACCEPTS: a `~.Figure` instance
    618+
    fig : `.Figure`
    619+
    .. ACCEPTS: a `.Figure` instance
    620620
    """
    621621
    # if this is a no-op just return
    622622
    if self.figure is fig:
    @@ -636,12 +636,12 @@ def set_figure(self, fig):
    636636

    637637
    def set_clip_box(self, clipbox):
    638638
    """
    639-
    Set the artist's clip `~.Bbox`.
    639+
    Set the artist's clip `.Bbox`.
    640640
    641641
    Parameters
    642642
    ----------
    643-
    clipbox : `~.Bbox`
    644-
    .. ACCEPTS: a `~.Bbox` instance
    643+
    clipbox : `.Bbox`
    644+
    .. ACCEPTS: a `.Bbox` instance
    645645
    """
    646646
    self.clipbox = clipbox
    647647
    self.pchanged()
    @@ -662,7 +662,7 @@ def set_clip_path(self, path, transform=None):
    662662
    this method will set the clipping box to the corresponding rectangle
    663663
    and set the clipping path to ``None``.
    664664
    665-
    ACCEPTS: [(`~matplotlib.path.Path`, `~.Transform`) | `~.Patch` | None]
    665+
    ACCEPTS: [(`~matplotlib.path.Path`, `.Transform`) | `.Patch` | None]
    666666
    """
    667667
    from matplotlib.patches import Patch, Rectangle
    668668

    lib/matplotlib/axes/_axes.py

    Lines changed: 32 additions & 32 deletions
    Original file line numberDiff line numberDiff line change
    @@ -345,7 +345,7 @@ def legend(self, *args, **kwargs):
    345345
    Parameters
    346346
    ----------
    347347
    348-
    handles : sequence of `~.Artist`, optional
    348+
    handles : sequence of `.Artist`, optional
    349349
    A list of Artists (lines, patches) to be added to the legend.
    350350
    Use this together with *labels*, if you need full control on what
    351351
    is shown in the legend and the automatic mechanism described above
    @@ -387,7 +387,7 @@ def legend(self, *args, **kwargs):
    387387
    corner of the legend in axes coordinates (in which case
    388388
    ``bbox_to_anchor`` will be ignored).
    389389
    390-
    bbox_to_anchor : `~.BboxBase` or pair of floats
    390+
    bbox_to_anchor : `.BboxBase` or pair of floats
    391391
    Specify any arbitrary location for the legend in `bbox_transform`
    392392
    coordinates (default Axes coordinates).
    393393
    @@ -412,13 +412,13 @@ def legend(self, *args, **kwargs):
    412412
    413413
    numpoints : None or int
    414414
    The number of marker points in the legend when creating a legend
    415-
    entry for a `~.Line2D` (line).
    415+
    entry for a `.Line2D` (line).
    416416
    Default is ``None``, which will take the value from
    417417
    :rc:`legend.numpoints`.
    418418
    419419
    scatterpoints : None or int
    420420
    The number of marker points in the legend when creating
    421-
    a legend entry for a `~.PathCollection` (scatter plot).
    421+
    a legend entry for a `.PathCollection` (scatter plot).
    422422
    Default is ``None``, which will take the value from
    423423
    :rc:`legend.scatterpoints`.
    424424
    @@ -1306,7 +1306,7 @@ def plot(self, *args, **kwargs):
    13061306
    >>> plot(y) # plot y using x as index array 0..N-1
    13071307
    >>> plot(y, 'r+') # ditto, but with red plusses
    13081308
    1309-
    You can use `~.Line2D` properties as keyword arguments for more
    1309+
    You can use `.Line2D` properties as keyword arguments for more
    13101310
    control on the appearance. Line properties and *fmt* can be mixed.
    13111311
    The following two calls yield identical results:
    13121312
    @@ -1404,7 +1404,7 @@ def plot(self, *args, **kwargs):
    14041404
    These parameters determined if the view limits are adapted to
    14051405
    the data limits. The values are passed on to `autoscale_view`.
    14061406
    1407-
    **kwargs : `~.Line2D` properties, optional
    1407+
    **kwargs : `.Line2D` properties, optional
    14081408
    *kwargs* are used to specify properties like a line label (for
    14091409
    auto legends), linewidth, antialiasing, marker face color.
    14101410
    Example::
    @@ -1415,14 +1415,14 @@ def plot(self, *args, **kwargs):
    14151415
    If you make multiple lines with one plot command, the kwargs
    14161416
    apply to all those lines.
    14171417
    1418-
    Here is a list of available `~.Line2D` properties:
    1418+
    Here is a list of available `.Line2D` properties:
    14191419
    14201420
    %(Line2D)s
    14211421
    14221422
    Returns
    14231423
    -------
    14241424
    lines
    1425-
    A list of `~.Line2D` objects that were added.
    1425+
    A list of `.Line2D` objects that were added.
    14261426
    14271427
    14281428
    See Also
    @@ -1801,12 +1801,12 @@ def acorr(self, x, **kwargs):
    18011801
    lag vector.
    18021802
    c : array (length ``2*maxlags+1``)
    18031803
    auto correlation vector.
    1804-
    line : `~.LineCollection` or `~.Line2D`
    1805-
    `~.Artist` added to the axes of the correlation.
    1804+
    line : `.LineCollection` or `.Line2D`
    1805+
    `.Artist` added to the axes of the correlation.
    18061806
    1807-
    `~.LineCollection` if *usevlines* is True
    1808-
    `~.Line2D` if *usevlines* is False
    1809-
    b : `~.Line2D` or None
    1807+
    `.LineCollection` if *usevlines* is True
    1808+
    `.Line2D` if *usevlines* is False
    1809+
    b : `.Line2D` or None
    18101810
    Horizontal line at 0 if *usevlines* is True
    18111811
    None *usevlines* is False
    18121812
    @@ -1863,12 +1863,12 @@ def xcorr(self, x, y, normed=True, detrend=mlab.detrend_none,
    18631863
    lag vector.
    18641864
    c : array (length ``2*maxlags+1``)
    18651865
    auto correlation vector.
    1866-
    line : `~.LineCollection` or `~.Line2D`
    1867-
    `~.Artist` added to the axes of the correlation
    1866+
    line : `.LineCollection` or `.Line2D`
    1867+
    `.Artist` added to the axes of the correlation
    18681868
    1869-
    `~.LineCollection` if *usevlines* is True
    1870-
    `~.Line2D` if *usevlines* is False
    1871-
    b : `~.Line2D` or None
    1869+
    `.LineCollection` if *usevlines* is True
    1870+
    `.Line2D` if *usevlines* is False
    1871+
    b : `.Line2D` or None
    18721872
    Horizontal line at 0 if *usevlines* is True
    18731873
    None *usevlines* is False
    18741874
    @@ -2050,7 +2050,7 @@ def bar(self, *args, **kwargs):
    20502050
    20512051
    Returns
    20522052
    -------
    2053-
    `~.BarContainer`
    2053+
    `.BarContainer`
    20542054
    Container with all the bars and optionally errorbars.
    20552055
    20562056
    Other Parameters
    @@ -2368,7 +2368,7 @@ def barh(self, *args, **kwargs):
    23682368
    23692369
    Returns
    23702370
    -------
    2371-
    `~.BarContainer`
    2371+
    `.BarContainer`
    23722372
    Container with all the bars and optionally errorbars.
    23732373
    23742374
    Other Parameters
    @@ -2486,7 +2486,7 @@ def broken_barh(self, xranges, yrange, **kwargs):
    24862486
    24872487
    Other Parameters
    24882488
    ----------------
    2489-
    **kwargs : :class:`~.BrokenBarHCollection` properties
    2489+
    **kwargs : :class:`.BrokenBarHCollection` properties
    24902490
    24912491
    Each *kwarg* can be either a single argument applying to all
    24922492
    rectangles, e.g.::
    @@ -2980,7 +2980,7 @@ def errorbar(self, x, y, yerr=None, xerr=None,
    29802980
    - *None*: No errorbar.
    29812981
    29822982
    fmt : plot format string, optional, default: ''
    2983-
    The format for the data points / data lines. See `~.plot` for
    2983+
    The format for the data points / data lines. See `.plot` for
    29842984
    details.
    29852985
    29862986
    Use 'none' (case insensitive) to plot errorbars without any data
    @@ -3050,7 +3050,7 @@ def errorbar(self, x, y, yerr=None, xerr=None,
    30503050
    property names, *markerfacecolor*, *markeredgecolor*, *markersize*
    30513051
    and *markeredgewidth*.
    30523052
    3053-
    Valid kwargs for the marker properties are `~.Lines2D` properties:
    3053+
    Valid kwargs for the marker properties are `.Lines2D` properties:
    30543054
    30553055
    %(Line2D)s
    30563056
    @@ -4104,7 +4104,7 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
    41044104
    ``image.cmap``.
    41054105
    41064106
    norm : `~matplotlib.colors.Normalize`, optional, default: None
    4107-
    A `~.Normalize` instance is used to scale luminance data to 0, 1.
    4107+
    A `.Normalize` instance is used to scale luminance data to 0, 1.
    41084108
    *norm* is only used if *c* is an array of floats. If *None*, use
    41094109
    the default `.colors.Normalize`.
    41104110
    @@ -5028,15 +5028,15 @@ def fill_between(self, x, y1, y2=0, where=None, interpolate=False,
    50285028
    Other Parameters
    50295029
    ----------------
    50305030
    **kwargs
    5031-
    All other keyword arguments are passed on to `~.PolyCollection`.
    5032-
    They control the `~.Polygon` properties:
    5031+
    All other keyword arguments are passed on to `.PolyCollection`.
    5032+
    They control the `.Polygon` properties:
    50335033
    50345034
    %(PolyCollection)s
    50355035
    50365036
    Returns
    50375037
    -------
    5038-
    `~.PolyCollection`
    5039-
    A `~.PolyCollection` containing the plotted polygons.
    5038+
    `.PolyCollection`
    5039+
    A `.PolyCollection` containing the plotted polygons.
    50405040
    50415041
    See Also
    50425042
    --------
    @@ -5212,15 +5212,15 @@ def fill_betweenx(self, y, x1, x2=0, where=None,
    52125212
    Other Parameters
    52135213
    ----------------
    52145214
    **kwargs
    5215-
    All other keyword arguments are passed on to `~.PolyCollection`.
    5216-
    They control the `~.Polygon` properties:
    5215+
    All other keyword arguments are passed on to `.PolyCollection`.
    5216+
    They control the `.Polygon` properties:
    52175217
    52185218
    %(PolyCollection)s
    52195219
    52205220
    Returns
    52215221
    -------
    5222-
    `~.PolyCollection`
    5223-
    A `~.PolyCollection` containing the plotted polygons.
    5222+
    `.PolyCollection`
    5223+
    A `.PolyCollection` containing the plotted polygons.
    52245224
    52255225
    See Also
    52265226
    --------

    lib/matplotlib/axes/_base.py

    Lines changed: 3 additions & 3 deletions
    Original file line numberDiff line numberDiff line change
    @@ -625,13 +625,13 @@ def _init_axis(self):
    625625

    626626
    def set_figure(self, fig):
    627627
    """
    628-
    Set the `~.Figure` for this `~.Axes`.
    628+
    Set the `.Figure` for this `.Axes`.
    629629
    630-
    .. ACCEPTS: `~.Figure`
    630+
    .. ACCEPTS: `.Figure`
    631631
    632632
    Parameters
    633633
    ----------
    634-
    fig : `~.Figure`
    634+
    fig : `.Figure`
    635635
    """
    636636
    martist.Artist.set_figure(self, fig)
    637637

    lib/matplotlib/cbook/__init__.py

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -614,7 +614,7 @@ def to_filehandle(fname, flag='rU', return_opened=False, encoding=None):
    614614

    615615
    @contextlib.contextmanager
    616616
    def open_file_cm(path_or_file, mode="r", encoding=None):
    617-
    r"""Pass through file objects and context-manage `~.PathLike`\s."""
    617+
    r"""Pass through file objects and context-manage `.PathLike`\s."""
    618618
    fh, opened = to_filehandle(path_or_file, mode, True, encoding)
    619619
    if opened:
    620620
    with fh:

    lib/matplotlib/cm.py

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -332,11 +332,11 @@ def set_cmap(self, cmap):
    332332
    def set_norm(self, norm):
    333333
    """Set the normalization instance.
    334334
    335-
    .. ACCEPTS: `~.Normalize`
    335+
    .. ACCEPTS: `.Normalize`
    336336
    337337
    Parameters
    338338
    ----------
    339-
    norm : `~.Normalize`
    339+
    norm : `.Normalize`
    340340
    """
    341341
    if norm is None:
    342342
    norm = colors.Normalize()

    lib/matplotlib/dates.py

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -297,10 +297,10 @@ def _dt64_to_ordinalf(d):
    297297
    def _from_ordinalf(x, tz=None):
    298298
    """
    299299
    Convert Gregorian float of the date, preserving hours, minutes,
    300-
    seconds and microseconds. Return value is a `~.datetime`.
    300+
    seconds and microseconds. Return value is a `.datetime`.
    301301
    302302
    The input date *x* is a float in ordinal days at UTC, and the output will
    303-
    be the specified `~.datetime` object corresponding to that time in
    303+
    be the specified `.datetime` object corresponding to that time in
    304304
    timezone *tz*, or if *tz* is ``None``, in the timezone specified in
    305305
    :rc:`timezone`.
    306306
    """

    0 commit comments

    Comments
     (0)
    0