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

Skip to content

Commit 7cb00f3

Browse files
committed
Move some links in rst out of running text.
This makes the unrendered docstrings more readable, IMO.
1 parent 17d16f9 commit 7cb00f3

File tree

4 files changed

+27
-34
lines changed

4 files changed

+27
-34
lines changed

lib/matplotlib/dates.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@
5555
:mod:`matplotlib.ticker` for general information on tick locators
5656
and formatters. These are described below.
5757
58+
The dateutil_ module provides additional code to handle date ticking, making it
59+
easy to place ticks on any kinds of dates. See examples below.
5860
59-
The `dateutil module <https://dateutil.readthedocs.io>`_ provides
60-
additional code to handle date ticking, making it easy to place ticks
61-
on any kinds of dates. See examples below.
61+
.. _dateutil: https://dateutil.readthedocs.io
6262
6363
Date tickers
6464
------------
@@ -104,13 +104,10 @@
104104
105105
* :class:`YearLocator`: locate years that are multiples of base
106106
107-
* :class:`RRuleLocator`: locate using a
108-
:class:`matplotlib.dates.rrulewrapper`. The
109-
:class:`rrulewrapper` is a simple wrapper around a
110-
:class:`dateutil.rrule` (`dateutil
111-
<https://dateutil.readthedocs.io>`_) which allow almost
112-
arbitrary date tick specifications. See `rrule example
113-
<../gallery/ticks_and_spines/date_demo_rrule.html>`_.
107+
* :class:`RRuleLocator`: locate using a `matplotlib.dates.rrulewrapper`.
108+
`.rrulewrapper` is a simple wrapper around dateutil_'s `dateutil.rrule`
109+
which allow almost arbitrary date tick specifications. See :doc:`rrule
110+
example </gallery/ticks_and_spines/date_demo_rrule>`.
114111
115112
* :class:`AutoDateLocator`: On autoscale, this class picks the best
116113
:class:`DateLocator` (e.g., :class:`RRuleLocator`)

lib/matplotlib/font_manager.py

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -600,12 +600,13 @@ class FontProperties(object):
600600
approach allows all text sizes to be made larger or smaller based
601601
on the font manager's default font size.
602602
603-
This class will also accept a `fontconfig
604-
<https://www.freedesktop.org/wiki/Software/fontconfig/>`_ pattern, if it is
605-
the only argument provided. See the documentation on `fontconfig patterns
606-
<https://www.freedesktop.org/software/fontconfig/fontconfig-user.html>`_.
607-
This support does not require fontconfig to be installed. We are merely
608-
borrowing its pattern syntax for use here.
603+
This class will also accept a fontconfig_ pattern_, if it is the only
604+
argument provided. This support does not require fontconfig to be
605+
installed. We are merely borrowing its pattern syntax for use here.
606+
607+
.. _fontconfig: https://www.freedesktop.org/wiki/Software/fontconfig/
608+
.. _pattern:
609+
https://www.freedesktop.org/software/fontconfig/fontconfig-user.html
609610
610611
Note that Matplotlib's internal font manager and fontconfig use a
611612
different algorithm to lookup fonts, so the results of the same pattern
@@ -728,12 +729,9 @@ def get_file(self):
728729

729730
def get_fontconfig_pattern(self):
730731
"""
731-
Get a fontconfig pattern suitable for looking up the font as
732+
Get a fontconfig_ pattern_ suitable for looking up the font as
732733
specified with fontconfig's ``fc-match`` utility.
733734
734-
See the documentation on `fontconfig patterns
735-
<https://www.freedesktop.org/software/fontconfig/fontconfig-user.html>`_.
736-
737735
This support does not require fontconfig to be installed or
738736
support for it to be enabled. We are merely borrowing its
739737
pattern syntax for use here.
@@ -842,10 +840,7 @@ def set_file(self, file):
842840

843841
def set_fontconfig_pattern(self, pattern):
844842
"""
845-
Set the properties by parsing a fontconfig *pattern*.
846-
847-
See the documentation on `fontconfig patterns
848-
<https://www.freedesktop.org/software/fontconfig/fontconfig-user.html>`_.
843+
Set the properties by parsing a fontconfig_ *pattern*.
849844
850845
This support does not require fontconfig to be installed or
851846
support for it to be enabled. We are merely borrowing its

lib/matplotlib/fontconfig_pattern.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
"""
2-
A module for parsing and generating fontconfig patterns.
2+
A module for parsing and generating `fontconfig patterns`_.
33
4-
See the `fontconfig pattern specification
5-
<https://www.freedesktop.org/software/fontconfig/fontconfig-user.html>`_ for
6-
more information.
4+
.. _fontconfig patterns:
5+
https://www.freedesktop.org/software/fontconfig/fontconfig-user.html
76
"""
87

98
# This class is defined here because it must be available in:
@@ -29,11 +28,11 @@
2928

3029

3130
class FontconfigPatternParser(object):
32-
"""A simple pyparsing-based parser for fontconfig-style patterns.
31+
"""
32+
A simple pyparsing-based parser for `fontconfig patterns`_.
3333
34-
See the `fontconfig pattern specification
35-
<https://www.freedesktop.org/software/fontconfig/fontconfig-user.html>`_
36-
for more information.
34+
.. _fontconfig patterns:
35+
https://www.freedesktop.org/software/fontconfig/fontconfig-user.html
3736
"""
3837

3938
_constants = {

lib/matplotlib/image.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,8 +1529,10 @@ def thumbnail(infile, thumbfile, scale=0.1, interpolation='bilinear',
15291529
Parameters
15301530
----------
15311531
infile : str or file-like
1532-
The image file -- must be PNG, Pillow-readable if you have `Pillow
1533-
<http://python-pillow.org/>`_ installed.
1532+
The image file -- must be PNG, or Pillow-readable if you have Pillow_
1533+
installed.
1534+
1535+
.. _Pillow: http://python-pillow.org/
15341536
15351537
thumbfile : str or file-like
15361538
The thumbnail filename.

0 commit comments

Comments
 (0)