Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7b08bee

Browse files
authored
Merge pull request #24242 from oscargus/environmentvariables
Add information about environment variables in matplotlib.__doc__
2 parents b4f1a4d + a2e0e83 commit 7b08bee

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

lib/matplotlib/__init__.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,24 @@
7777
figure is created, because it is not possible to switch between
7878
different GUI backends after that.
7979
80+
The following environment variables can be used to customize the behavior::
81+
82+
.. envvar:: MPLBACKEND
83+
84+
This optional variable can be set to choose the Matplotlib backend. See
85+
:ref:`what-is-a-backend`.
86+
87+
.. envvar:: MPLCONFIGDIR
88+
89+
This is the directory used to store user customizations to
90+
Matplotlib, as well as some caches to improve performance. If
91+
:envvar:`MPLCONFIGDIR` is not defined, :file:`{HOME}/.config/matplotlib`
92+
and :file:`{HOME}/.cache/matplotlib` are used on Linux, and
93+
:file:`{HOME}/.matplotlib` on other platforms, if they are
94+
writable. Otherwise, the Python standard library's `tempfile.gettempdir`
95+
is used to find a base directory in which the :file:`matplotlib`
96+
subdirectory is created.
97+
8098
Matplotlib was initially written by John D. Hunter (1968-2012) and is now
8199
developed and maintained by a host of others.
82100

0 commit comments

Comments
 (0)