[Matplotlib-users] Render plot labels with LaTeX

Eric Firing efiring at hawaii.edu
Sat Apr 23 13:35:46 EDT 2016

On 2016/04/23 3:09 AM, Ruth Sims wrote:
> Running Matplotlib v: 1.5.1 in Anaconda on OS X El Capitan, V 10.11.4
> trying to render plot labels with LaTeX so I can use figures in my
> thesis. However, whenever I uncomment the command 'usetex = true', I
> receive an error similar to the below:
> RuntimeError: LaTeX was not able to process the following string:
> 'lp'
> Here is the full report generated by LaTeX:
> I have MacTeX-2015 and LaTeX, dvipng and ghostscript are each on my
> PATH. According to the instructions on
> <https://github.com/matplotlib/matplotlib/issues/5076>https://github.com/matplotlib/matplotlib/issues/5076
> I was able to reproduce the code in a clean environment - so I assume
> there is nothing wrong with any of the installations.

Ruth, if you put the code from your first attachment in a file, and run 
that file as a script from the command line instead of within ipython, 
do you still get the error?  It looks like even in your "clean 
environment", some ipython startup code is being run (importing sympy, 
etc.).  There are also other places where pieces of old environment 
might be getting pulled in, such as from a matplotlibrc file.


> I've tried most of the suggestions I found on various mailing lists but
> still received the same error.
> Thanks,
> Ruth Sims
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-users

More information about the Matplotlib-users mailing list