1

I have a very strange problem that appeared recently, more or less simultaneously to my Ubuntu upgrade to 16.10.

Using Pyplot, when I use LaTeX in labels, Python3 gives back something very strange. For example, I tried to compile the example from http://matplotlib.org/examples/text_labels_and_annotations/text_demo_fontdict.html and I got this result:

enter image description here

I try to upgrade my matplotlib with pip, but nothing changed. Right now: numpy=1.11.1, matplotlib=1.5.3

Interestingly, this problem disappears when I go back to python2, and the conversion is good.

Edit: on another machine, with Ubuntu 16.10 up-to-date, the same mpl and np versions, this bug appears in python3 AND python2.

EEdit : I did not find the problem, but a guess is a problem in the cm font of matplotlib. I tried to change the font (see e.g. How do I change the axis tick font in a matplotlib plot when rendering using Latex?), and the problem disappeared...

Thanks in advance for your help!

Community
  • 1
  • 1
Arnaud
  • 11
  • 2
  • Looks similar to this: http://stackoverflow.com/questions/39337229/wrong-latex-rendering-in-matplotlib problem. Do you get any errors / warnings while plotting? – Bart Oct 21 '16 at 06:11
  • Nothing that I am aware of. python -v does not give useful infos. – Arnaud Oct 21 '16 at 09:46
  • Works fine for me on `python 3.5.2` and `matplotlib 2.0.0b4` (MacOS). Maybe try updating matplotlib to 2.x? – Vlas Sokolov Oct 21 '16 at 15:43

0 Answers0