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

Skip to content

Commit db1c600

Browse files
committed
Merge pull request #4039 from Pybonacci/fix-stylesheets-docs
DOC : better reflect where config folder is in style docs added some fixes in order to use the result obtained from `mpl._get_configdir()`
1 parent abb836f commit db1c600

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

doc/users/style_sheets.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ Defining your own style
2525
=======================
2626

2727
You can create custom styles and use them by calling ``style.use`` with the
28-
path or URL to the style sheet. Alternatively, if you add your
29-
``<style-name>.mplstyle`` file to ``~/.matplotlib/stylelib`` (you may need to
30-
create this directory), you can reuse your custom style sheet with a call to
31-
``style.use(<style-name>)``. Note that a custom style sheet in
32-
``~/.matplotlib/stylelib`` will override a style sheet defined by matplotlib if
33-
the styles have the same name.
28+
path or URL to the style sheet. Alternatively, if you add your ``<style-name>.mplstyle``
29+
file to ``mpl_configdir/stylelib`, you can reuse your custom style sheet with a call to
30+
``style.use(<style-name>)``. By default ``mpl_configdir`` should be ``~/.config/matplotlib``,
31+
but you can check where yours is with ``matplotlib.get_configdir()``, you may need to
32+
create this directory. Note that a custom style sheet in ``mpl_configdir/stylelib``
33+
will override a style sheet defined by matplotlib if the styles have the same name.
3434

3535
For example, you might want to create
36-
``~/.matplotlib/stylelib/presentation.mplstyle`` with the following::
36+
``mpl_configdir/stylelib/presentation.mplstyle`` with the following::
3737

3838
axes.titlesize : 24
3939
axes.labelsize : 20

0 commit comments

Comments
 (0)