File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,10 @@ Environment Variables
2525
2626 This is the directory used to store user customizations to matplotlib, as
2727 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.
2932
3033.. _setting-linux-osx-environment-variables :
3134
Original file line number Diff line number Diff line change @@ -483,10 +483,14 @@ def _create_tmp_config_dir():
483483
484484def _get_configdir ():
485485 """
486- Return the string representing the configuration dir .
486+ Return the string representing the configuration directory .
487487
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.
490494 """
491495
492496 configdir = os .environ .get ('MPLCONFIGDIR' )
You can’t perform that action at this time.
0 commit comments