Skip to content

Commit

Permalink
Merge pull request #25754 from meeseeksmachine/auto-backport-of-pr-25…
Browse files Browse the repository at this point in the history
…727-on-v3.7.x

Backport PR #25727 on branch v3.7.x (Doc: Replace matplotlibrc.template)
  • Loading branch information
rcomer committed Apr 23, 2023
2 parents 6f2ea43 + 9107496 commit 207de3d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ def _rc_params_in_file(fname, transform=lambda x: x, fail_on_error=False):
_log.warning("""
Bad key %(key)s in file %(fname)s, line %(line_no)s (%(line)r)
You probably need to get an updated matplotlibrc file from
https://github.com/matplotlib/matplotlib/blob/%(version)s/matplotlibrc.template
https://github.com/matplotlib/matplotlib/blob/%(version)s/lib/matplotlib/mpl-data/matplotlibrc
or from the matplotlib source distribution""",
dict(key=key, fname=fname, line_no=line_no,
line=line.rstrip('\n'), version=version))
Expand Down
3 changes: 1 addition & 2 deletions lib/matplotlib/font_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -876,8 +876,7 @@ def set_math_fontfamily(self, fontfamily):
The name of the font family.
Available font families are defined in the
matplotlibrc.template file
:ref:`here <customizing-with-matplotlibrc-files>`
:ref:`default matplotlibrc file <customizing-with-matplotlibrc-files>`.
See Also
--------
Expand Down
11 changes: 6 additions & 5 deletions lib/matplotlib/rcsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
The default values of the rc settings are set in the default matplotlibrc file.
Any additions or deletions to the parameter set listed here should also be
propagated to the :file:`matplotlibrc.template` in Matplotlib's root source
directory.
propagated to the :file:`lib/matplotlib/mpl-data/matplotlibrc` in Matplotlib's
root source directory.
"""

import ast
Expand Down Expand Up @@ -808,8 +808,8 @@ def _convert_validator_spec(key, conv):
# Mapping of rcParams to validators.
# Converters given as lists or _ignorecase are converted to ValidateInStrings
# immediately below.
# The rcParams defaults are defined in matplotlibrc.template, which gets copied
# to matplotlib/mpl-data/matplotlibrc by the setup script.
# The rcParams defaults are defined in lib/matplotlib/mpl-data/matplotlibrc, which
# gets copied to matplotlib/mpl-data/matplotlibrc by the setup script.
_validators = {
"backend": validate_backend,
"backend_fallback": validate_bool,
Expand Down Expand Up @@ -1255,7 +1255,8 @@ def _convert_validator_spec(key, conv):
# altogether. For that use `matplotlib.style.use("classic")`.
"_internal.classic_mode": validate_bool
}
_hardcoded_defaults = { # Defaults not inferred from matplotlibrc.template...
_hardcoded_defaults = { # Defaults not inferred from
# lib/matplotlib/mpl-data/matplotlibrc...
# ... because they are private:
"_internal.classic_mode": False,
# ... because they are deprecated:
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ def set_math_fontfamily(self, fontfamily):
The name of the font family.
Available font families are defined in the
:ref:`matplotlibrc.template file
:ref:`default matplotlibrc file
<customizing-with-matplotlibrc-files>`.
See Also
Expand Down

0 comments on commit 207de3d

Please sign in to comment.