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

Skip to content

Commit 8e9ca92

Browse files
authored
Merge pull request #28935 from QuLogic/fix-invalid-rcparams
DOC: Fix invalid rcParam references
2 parents e72dc34 + 04c7dbe commit 8e9ca92

File tree

17 files changed

+28
-30
lines changed

17 files changed

+28
-30
lines changed

doc/api/prev_api_changes/api_changes_2.2.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ the future, only broadcasting (1 column to *n* columns) will be performed.
6161
rcparams
6262
~~~~~~~~
6363

64-
The :rc:`backend.qt4` and :rc:`backend.qt5` rcParams were deprecated
64+
The ``backend.qt4`` and ``backend.qt5`` rcParams were deprecated
6565
in version 2.2. In order to force the use of a specific Qt binding,
6666
either import that binding first, or set the ``QT_API`` environment
6767
variable.

doc/api/prev_api_changes/api_changes_3.1.0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,8 +743,8 @@ The following signature related behaviours are deprecated:
743743
`.Axes.annotate()` instead.
744744
- Passing (n, 1)-shaped error arrays to `.Axes.errorbar()`, which was not
745745
documented and did not work for ``n = 2``. Pass a 1D array instead.
746-
- The *frameon* kwarg to `~.Figure.savefig` and the :rc:`savefig.frameon` rcParam.
747-
To emulate ``frameon = False``, set *facecolor* to fully
746+
- The *frameon* keyword argument to `~.Figure.savefig` and the ``savefig.frameon``
747+
rcParam. To emulate ``frameon = False``, set *facecolor* to fully
748748
transparent (``"none"``, or ``(0, 0, 0, 0)``).
749749
- Passing a non-1D (typically, (n, 1)-shaped) input to `.Axes.pie`.
750750
Pass a 1D array instead.

doc/api/prev_api_changes/api_changes_3.2.0/removals.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The following API elements have been removed:
6161
- passing ``(verts, 0)`` or ``(..., 3)`` when specifying a marker to specify a
6262
path or a circle, respectively (instead, use ``verts`` or ``"o"``,
6363
respectively)
64-
- :rc:`examples.directory`
64+
- the ``examples.directory`` rcParam
6565

6666
The following members of ``matplotlib.backends.backend_pdf.PdfFile`` were removed:
6767

doc/api/prev_api_changes/api_changes_3.3.0/deprecations.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ Passing both singular and plural *colors*, *linewidths*, *linestyles* to `.Axes.
8383
Passing e.g. both *linewidth* and *linewidths* will raise a TypeError in the
8484
future.
8585

86-
Setting :rc:`text.latex.preamble` or :rc:`pdf.preamble` to non-strings
87-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
86+
Setting ``text.latex.preamble`` or ``pdf.preamble`` rcParams to non-strings
87+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8888
These rcParams should be set to string values. Support for None (meaning the
8989
empty string) and lists of strings (implicitly joined with newlines) is
9090
deprecated.
@@ -311,7 +311,7 @@ JPEG options
311311
~~~~~~~~~~~~
312312
The *quality*, *optimize*, and *progressive* keyword arguments to
313313
`~.Figure.savefig`, which were only used when saving to JPEG, are deprecated.
314-
:rc:`savefig.jpeg_quality` is likewise deprecated.
314+
The ``savefig.jpeg_quality`` rcParam is likewise deprecated.
315315

316316
Such options should now be directly passed to Pillow using
317317
``savefig(..., pil_kwargs={"quality": ..., "optimize": ..., "progressive": ...})``.

doc/api/prev_api_changes/api_changes_3.5.0/removals.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,6 @@ rcParams
359359

360360
- :rc:`axes.axisbelow` no longer accepts strings starting with "line"
361361
(case-insensitive) as "line"; use "line" (case-sensitive) instead.
362-
- :rc:`text.latex.preamble` and :rc:`pdf.preamble` no longer accept
363-
non-string values.
362+
- :rc:`text.latex.preamble` and ``pdf.preamble`` no longer accept non-string values.
364363
- All ``*.linestyle`` rcParams no longer accept ``offset = None``; set the
365364
offset to 0 instead.

doc/api/prev_api_changes/api_changes_3.8.0/behaviour.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ Passing ``None`` as ``rotation_mode`` to `.Text` (the default value) or passing
159159
`.Text.set_rotation_mode` will make `.Text.get_rotation_mode` return ``"default"``
160160
instead of ``None``. The behaviour otherwise is the same.
161161

162-
PostScript paper type adds option to use figure size
162+
PostScript paper size adds option to use figure size
163163
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
164164

165-
The :rc:`ps.papertype` rcParam can now be set to ``'figure'``, which will use
165+
The :rc:`ps.papersize` rcParam can now be set to ``'figure'``, which will use
166166
a paper size that corresponds exactly with the size of the figure that is being
167167
saved.
168168

doc/devel/MEP/MEP23.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ desirable to be able to group these under the same window. See :ghpull:`2194`.
3838

3939

4040
The proposed solution modifies `.FigureManagerBase` to contain and manage more
41-
than one ``Canvas``. The settings parameter :rc:`backend.multifigure` control
42-
when the **MultiFigure** behaviour is desired.
41+
than one ``Canvas``. The ``backend.multifigure`` rcParam controls when the
42+
**MultiFigure** behaviour is desired.
4343

4444
**Note**
4545

doc/users/prev_whats_new/whats_new_1.3.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,9 @@ rcParam has been set, and will not retroactively affect already
292292
existing text objects. This brings their behavior in line with most
293293
other rcParams.
294294

295-
Added :rc:`savefig.jpeg_quality`
296-
````````````````````````````````
297-
rcParam value :rc:`savefig.jpeg_quality` was added so that the user can
295+
Added ``savefig.jpeg_quality`` rcParam
296+
``````````````````````````````````````
297+
The ``savefig.jpeg_quality`` rcParam was added so that the user can
298298
configure the default quality used when a figure is written as a JPEG.
299299
The default quality is 95; previously, the default quality was 75.
300300
This change minimizes the artifacting inherent in JPEG images,

doc/users/prev_whats_new/whats_new_1.5.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ Some parameters have been added, others have been improved.
190190
+---------------------------+--------------------------------------------------+
191191
| Parameter | Description |
192192
+===========================+==================================================+
193-
|:rc:`xaxis.labelpad`, | mplot3d now respects these parameters |
194-
|:rc:`yaxis.labelpad` | |
193+
|``xaxis.labelpad``, | mplot3d now respects these attributes, which |
194+
|``yaxis.labelpad`` | default to :rc:`axes.labelpad` |
195195
+---------------------------+--------------------------------------------------+
196196
|:rc:`axes.labelpad` | Default space between the axis and the label |
197197
+---------------------------+--------------------------------------------------+

doc/users/prev_whats_new/whats_new_3.1.0.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,7 @@ Default minor tick spacing was changed from 0.625 to 0.5 for major ticks spaced
260260

261261
A public API has been added to `.EngFormatter` to control how the numbers in
262262
the ticklabels will be rendered. By default, *useMathText* evaluates to
263-
:rc:`axes.formatter.use_mathtext'` and *usetex* evaluates to
264-
:rc:`'text.usetex'`.
263+
:rc:`axes.formatter.use_mathtext` and *usetex* evaluates to :rc:`text.usetex`.
265264

266265
If either is `True` then the numbers will be encapsulated by ``$``
267266
signs. When using ``TeX`` this implies that the numbers will be shown

doc/users/prev_whats_new/whats_new_3.3.0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ positioning. For the xlabel, the supported values are 'left', 'center', or
292292
'right'. For the ylabel, the supported values are 'bottom', 'center', or
293293
'top'.
294294

295-
The default is controlled via :rc:`xaxis.labelposition` and
296-
:rc:`yaxis.labelposition`; the Colorbar label takes the rcParam based on its
295+
The default is controlled via :rc:`xaxis.labellocation` and
296+
:rc:`yaxis.labellocation`; the Colorbar label takes the rcParam based on its
297297
orientation.
298298

299299
.. plot::

doc/users/prev_whats_new/whats_new_3.6.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Linestyles for negative contours may be set individually
217217

218218
The line style of negative contours may be set by passing the
219219
*negative_linestyles* argument to `.Axes.contour`. Previously, this style could
220-
only be set globally via :rc:`contour.negative_linestyles`.
220+
only be set globally via :rc:`contour.negative_linestyle`.
221221

222222
.. plot::
223223
:alt: Two contour plots, each showing two positive and two negative contours. The positive contours are shown in solid black lines in both plots. In one plot the negative contours are shown in dashed lines, which is the current styling. In the other plot they're shown in dotted lines, which is one of the new options.

doc/users/prev_whats_new/whats_new_3.8.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ Other improvements
496496
macosx: New figures can be opened in either windows or tabs
497497
-----------------------------------------------------------
498498

499-
There is a new :rc:`macosx.window_mode`` rcParam to control how
499+
There is a new :rc:`macosx.window_mode` rcParam to control how
500500
new figures are opened with the macosx backend. The default is
501501
**system** which uses the system settings, or one can specify either
502502
**tab** or **window** to explicitly choose the mode used to open new figures.

lib/matplotlib/axis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ class Axis(martist.Artist):
574574
The axis label.
575575
labelpad : float
576576
The distance between the axis label and the tick labels.
577-
Defaults to :rc:`axes.labelpad` = 4.
577+
Defaults to :rc:`axes.labelpad`.
578578
offsetText : `~matplotlib.text.Text`
579579
A `.Text` object containing the data offset of the ticks (if any).
580580
pickradius : float

lib/matplotlib/collections.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ def __init__(self, *,
113113
where *onoffseq* is an even length tuple of on and off ink lengths
114114
in points. For examples, see
115115
:doc:`/gallery/lines_bars_and_markers/linestyles`.
116-
capstyle : `.CapStyle`-like, default: :rc:`patch.capstyle`
116+
capstyle : `.CapStyle`-like, default: 'butt'
117117
Style to use for capping lines for all paths in the collection.
118118
Allowed values are %(CapStyle)s.
119-
joinstyle : `.JoinStyle`-like, default: :rc:`patch.joinstyle`
119+
joinstyle : `.JoinStyle`-like, default: 'round'
120120
Style to use for joining lines for all paths in the collection.
121121
Allowed values are %(JoinStyle)s.
122122
antialiaseds : bool or list of bool, default: :rc:`patch.antialiased`

lib/matplotlib/contour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1643,7 +1643,7 @@ def _initialize_x_y(self, z):
16431643
specifies the line style for negative contours.
16441644
16451645
If *negative_linestyles* is *None*, the default is taken from
1646-
:rc:`contour.negative_linestyles`.
1646+
:rc:`contour.negative_linestyle`.
16471647
16481648
*negative_linestyles* can also be an iterable of the above strings
16491649
specifying a set of linestyles to be used. If this iterable is shorter than

lib/matplotlib/dates.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
is achievable for (approximately) 70 years on either side of the epoch, and
3838
20 microseconds for the rest of the allowable range of dates (year 0001 to
3939
9999). The epoch can be changed at import time via `.dates.set_epoch` or
40-
:rc:`dates.epoch` to other dates if necessary; see
40+
:rc:`date.epoch` to other dates if necessary; see
4141
:doc:`/gallery/ticks/date_precision_and_epochs` for a discussion.
4242
4343
.. note::
@@ -267,7 +267,7 @@ def set_epoch(epoch):
267267
"""
268268
Set the epoch (origin for dates) for datetime calculations.
269269
270-
The default epoch is :rc:`dates.epoch` (by default 1970-01-01T00:00).
270+
The default epoch is :rc:`date.epoch`.
271271
272272
If microsecond accuracy is desired, the date being plotted needs to be
273273
within approximately 70 years of the epoch. Matplotlib internally

0 commit comments

Comments
 (0)