@@ -34,31 +34,45 @@ and printing the ``__file__`` attribute::
34
34
35
35
.. _locating-matplotlib-config-dir :
36
36
37
- :file: `. matplotlib ` directory location
38
- ======================================
37
+ :file: `matplotlib ` configuration and cache directory locations
38
+ ==============================================================
39
39
40
40
Each user has a matplotlib configuration directory which may contain a
41
41
:ref: `matplotlibrc <customizing-with-matplotlibrc-files >` file. To
42
- locate your :file: `. matplotlib/ ` directory, use
42
+ locate your :file: `matplotlib/ ` configuration directory, use
43
43
:func: `matplotlib.get_configdir `::
44
44
45
45
>>> import matplotlib as mpl
46
46
>>> mpl.get_configdir()
47
- '/home/darren/.matplotlib'
47
+ '/home/darren/.config/ matplotlib'
48
48
49
49
On unix-like systems, this directory is generally located in your
50
- :envvar: `HOME ` directory. On windows, it is in your documents and
51
- settings directory by default::
50
+ :envvar: `HOME ` directory under the :file: `.config/ ` directory.
51
+
52
+ In addition, users have a cache directory. On unix-like systems, this is
53
+ separate from the configuration directory by default. To locate your
54
+ :file: `.cache/ ` directory, use :func: `matplotlib.get_cachedir `::
55
+
56
+ >>> import matplotlib as mpl
57
+ >>> mpl.get_cachedir()
58
+ '/home/darren/.cache/matplotlib'
59
+
60
+ On windows, both the config directory and the cache directory are
61
+ the same and are in your :file: `Documents and Settings ` or :file: `Users `
62
+ directory by default::
52
63
53
64
>>> import matplotlib
54
65
>>> mpl.get_configdir()
55
66
'C:\\Documents and Settings\\jdhunter\\.matplotlib'
67
+ >>> mpl.get_cachedir()
68
+ 'C:\\Documents and Settings\\jdhunter\\.matplotlib'
56
69
57
70
If you would like to use a different configuration directory, you can
58
71
do so by specifying the location in your :envvar: `MPLCONFIGDIR `
59
72
environment variable -- see
60
- :ref: `setting-linux-osx-environment-variables `.
61
-
73
+ :ref: `setting-linux-osx-environment-variables `. Note that
74
+ :envvar: `MPLCONFIGDIR ` sets the location of both the configuration
75
+ directory and the cache directory.
62
76
63
77
.. _reporting-problems :
64
78
0 commit comments