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

Skip to content

Commit 137d6c4

Browse files
author
juan.gonzalez
committed
Docs on how to set a custom directory for stylelib/
1 parent 705678e commit 137d6c4

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

doc/users/customizing.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ path or URL to the style sheet. Additionally, if you add your
3232
your custom style sheet with a call to ``style.use(<style-name>)``. By default
3333
``mpl_configdir`` should be ``~/.config/matplotlib``, but you can check where
3434
yours is with ``matplotlib.get_configdir()``; you may need to create this
35-
directory. Note that a custom style sheet in ``mpl_configdir/stylelib`` will
35+
directory. You also can change the directory where matplotlib looks for
36+
the stylelib/ folder by setting the MPLCONFIG environment variable
37+
, see :ref:`locating-matplotlib-config-dir`.
38+
39+
Note that a custom style sheet in ``mpl_configdir/stylelib`` will
3640
override a style sheet defined by matplotlib if the styles have the same name.
3741

3842
For example, you might want to create
@@ -131,7 +135,7 @@ locations, in the following order:
131135
1. :file:`matplotlibrc` in the current working directory, usually used for
132136
specific customizations that you do not want to apply elsewhere.
133137

134-
2. :file:`$MATPLOTLIBRC/matplotlibrc`.
138+
2. :file:`$MATPLOTLIBRC` if it is a file, else :file:`$MATPLOTLIBRC/matplotlibrc`.
135139

136140
3. It next looks in a user-specific place, depending on your platform:
137141

0 commit comments

Comments
 (0)