mpl.get_configdir()

mpl.get_configdir(*args, **kwargs)

Return the string representing the configuration directory.

The directory is chosen as follows:

  1. If the MPLCONFIGDIR environment variable is supplied, choose that.
2a. On Linux, if $HOME/.matplotlib exists, choose that, but warn that
that is the old location. Barring that, follow the XDG specification and look first in $XDG_CONFIG_HOME, if defined, or $HOME/.config.

2b. On other platforms, choose $HOME/.matplotlib.

  1. If the chosen directory exists and is writable, use that as the configuration directory.
  2. If possible, create a temporary directory, and use it as the configuration directory.
  3. A writable directory could not be found or created; return None.