@@ -34,8 +34,8 @@ and printing the ``__file__`` attribute::
34
34
35
35
.. _locating-matplotlib-config-dir :
36
36
37
- :file: `.matplotlib ` directory location
38
- ======================================
37
+ :file: `.matplotlib ` and ` .cache ` directory location
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
@@ -47,18 +47,31 @@ locate your :file:`.matplotlib/` directory, use
47
47
'/home/darren/.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.
51
+
52
+ In addition, users have a cache directory. On unix-like systems, this is
53
+ separate to 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 documents and settings directory by default::
52
62
53
63
>>> import matplotlib
54
64
>>> mpl.get_configdir()
55
65
'C:\\Documents and Settings\\jdhunter\\.matplotlib'
66
+ >>> mpl.get_cachedir()
67
+ 'C:\\Documents and Settings\\jdhunter\\.matplotlib'
56
68
57
69
If you would like to use a different configuration directory, you can
58
70
do so by specifying the location in your :envvar: `MPLCONFIGDIR `
59
71
environment variable -- see
60
- :ref: `setting-linux-osx-environment-variables `.
61
-
72
+ :ref: `setting-linux-osx-environment-variables `. Note that
73
+ :envvar: `MPLCONFIGDIR ` sets the location of both the configuration
74
+ directory and the cache directory.
62
75
63
76
.. _reporting-problems :
64
77
0 commit comments