I have the following problem and I am totally new to matplotlib and python: To produce high qualitiy plots for my thesis I want to use matplotlib and I want to use the latex
Your problem has been seen before as reported here on the matplotlib-user mailing list. The resolution is here and the confirmation that it works is here.
In summary, you need to clear the tex.cache directory.
To find where that directory is - go into python and execute matplotlib.get_cachedir()
For a standard Ubuntu 14.04 install - you should get something like the following:
~$ python3
Python 3.4.0 (default, Apr 11 2014, 13:05:11)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib as mpl
>>> mpl.get_cachedir()
'/home//.cache/matplotlib'
Then do rm
and then re-run and it should all work.
Some tips like this are available in the usetex troubleshooting docs section, which lead to here to locate the directory, but they unfortunately don't mention get_cachedir()
Edit Pull Request generated based on this question and merged into the matplotlib docs.