File tree 2 files changed +11
-4
lines changed 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,10 @@ Environment Variables
25
25
26
26
This is the directory used to store user customizations to matplotlib, as
27
27
well as some caches to improve performance. If :envvar: `MPLCONFIGDIR ` is not
28
- defined, :file: `{ HOME } /.matplotlib ` is used by default.
28
+ defined, :file: `{ HOME } /.matplotlib ` is used if it is writable.
29
+ Otherwise, the python standard library :func: `tempfile.gettmpdir ` is
30
+ used to find a base directory in which the :file: `matplotlib `
31
+ subdirectory is created.
29
32
30
33
.. _setting-linux-osx-environment-variables :
31
34
Original file line number Diff line number Diff line change @@ -483,10 +483,14 @@ def _create_tmp_config_dir():
483
483
484
484
def _get_configdir ():
485
485
"""
486
- Return the string representing the configuration dir .
486
+ Return the string representing the configuration directory .
487
487
488
- default is HOME/.matplotlib. you can override this with the
489
- MPLCONFIGDIR environment variable
488
+ Default is HOME/.matplotlib. You can override this with the
489
+ MPLCONFIGDIR environment variable. If the default is not
490
+ writable, and MPLCONFIGDIR is not set, then
491
+ tempfile.gettempdir() is used to provide a directory in
492
+ which a matplotlib subdirectory is created as the configuration
493
+ directory.
490
494
"""
491
495
492
496
configdir = os .environ .get ('MPLCONFIGDIR' )
You can’t perform that action at this time.
0 commit comments