Matplotlib configuration

Note 4/Sept/2013: the new location is /home/user/.config/matplotlib

If you have ipython, try this command

ipython -pylab

and if you have Qt, you can change the backend (library used for plotting) and use qt as follows:

ipython -pylab qt

Matploltib set up a special file called matplotlibrc, which can be found in the directory .matplotlib/ ( with a dot in front of it).

To locate your .matplotlib/ directory, use matplotlib.get_configdir():

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

If you would like to use a different configuration directory, you can do so by specifying the location in your MPLCONFIGDIR environment variable

In order to fill the configuration file you will need to know the keywords. The full list is available here: http://matplotlib.org/users/customizing.html

Please follow and like us:
This entry was posted in Python and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *