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

Skip to content

Commit 16a868e

Browse files
committed
Rearranged the Customization docs: simply switched the two paragraphs
1 parent 6a32d35 commit 16a868e

File tree

1 file changed

+27
-28
lines changed

1 file changed

+27
-28
lines changed

doc/users/customizing.rst

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,33 @@
44
Customizing matplotlib
55
**********************
66

7+
.. _customizing-with-dynamic-rc-settings:
8+
9+
Dynamic rc settings
10+
===================
11+
12+
You can also dynamically change the default rc settings in a python script or
13+
interactively from the python shell. All of the rc settings are stored in a
14+
dictionary-like variable called :data:`matplotlib.rcParams`, which is global to
15+
the matplotlib package. rcParams can be modified directly, for example::
16+
17+
import matplotlib as mpl
18+
mpl.rcParams['lines.linewidth'] = 2
19+
mpl.rcParams['lines.color'] = 'r'
20+
21+
Matplotlib also provides a couple of convenience functions for modifying rc
22+
settings. The :func:`matplotlib.rc` command can be used to modify multiple
23+
settings in a single group at once, using keyword arguments::
24+
25+
import matplotlib as mpl
26+
mpl.rc('lines', linewidth=2, color='r')
27+
28+
The :func:`matplotlib.rcdefaults` command will restore the standard matplotlib
29+
default settings.
30+
31+
There is some degree of validation when setting the values of rcParams, see
32+
:mod:`matplotlib.rcsetup` for details.
33+
734
.. _customizing-with-matplotlibrc-files:
835

936
The :file:`matplotlibrc` file
@@ -46,34 +73,6 @@ loaded from, one can do the following::
4673

4774
See below for a sample :ref:`matplotlibrc file<matplotlibrc-sample>`.
4875

49-
.. _customizing-with-dynamic-rc-settings:
50-
51-
Dynamic rc settings
52-
===================
53-
54-
You can also dynamically change the default rc settings in a python script or
55-
interactively from the python shell. All of the rc settings are stored in a
56-
dictionary-like variable called :data:`matplotlib.rcParams`, which is global to
57-
the matplotlib package. rcParams can be modified directly, for example::
58-
59-
import matplotlib as mpl
60-
mpl.rcParams['lines.linewidth'] = 2
61-
mpl.rcParams['lines.color'] = 'r'
62-
63-
Matplotlib also provides a couple of convenience functions for modifying rc
64-
settings. The :func:`matplotlib.rc` command can be used to modify multiple
65-
settings in a single group at once, using keyword arguments::
66-
67-
import matplotlib as mpl
68-
mpl.rc('lines', linewidth=2, color='r')
69-
70-
The :func:`matplotlib.rcdefaults` command will restore the standard matplotlib
71-
default settings.
72-
73-
There is some degree of validation when setting the values of rcParams, see
74-
:mod:`matplotlib.rcsetup` for details.
75-
76-
7776
.. _matplotlibrc-sample:
7877

7978
A sample matplotlibrc file

0 commit comments

Comments
 (0)