Skip to content

Document get_cachedir() in troubleshooting #4860

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 4, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions doc/faq/troubleshooting_faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,45 @@ and printing the ``__file__`` attribute::

.. _locating-matplotlib-config-dir:

:file:`.matplotlib` directory location
======================================
:file:`matplotlib` configuration and cache directory locations
==============================================================

Each user has a matplotlib configuration directory which may contain a
:ref:`matplotlibrc <customizing-with-matplotlibrc-files>` file. To
locate your :file:`.matplotlib/` directory, use
locate your :file:`matplotlib/` configuration directory, use
:func:`matplotlib.get_configdir`::

>>> import matplotlib as mpl
>>> mpl.get_configdir()
'/home/darren/.matplotlib'
'/home/darren/.config/matplotlib'

On unix-like systems, this directory is generally located in your
:envvar:`HOME` directory. On windows, it is in your documents and
settings directory by default::
:envvar:`HOME` directory under the :file:`.config/` directory.

In addition, users have a cache directory. On unix-like systems, this is
separate from the configuration directory by default. To locate your
:file:`.cache/` directory, use :func:`matplotlib.get_cachedir`::

>>> import matplotlib as mpl
>>> mpl.get_cachedir()
'/home/darren/.cache/matplotlib'

On windows, both the config directory and the cache directory are
the same and are in your :file:`Documents and Settings` or :file:`Users`
directory by default::

>>> import matplotlib
>>> mpl.get_configdir()
'C:\\Documents and Settings\\jdhunter\\.matplotlib'
>>> mpl.get_cachedir()
'C:\\Documents and Settings\\jdhunter\\.matplotlib'

If you would like to use a different configuration directory, you can
do so by specifying the location in your :envvar:`MPLCONFIGDIR`
environment variable -- see
:ref:`setting-linux-osx-environment-variables`.

:ref:`setting-linux-osx-environment-variables`. Note that
:envvar:`MPLCONFIGDIR` sets the location of both the configuration
directory and the cache directory.

.. _reporting-problems:

Expand Down