<div dir="ltr">I can't reproduce with matplotlib master, suggesting this bug has already been fixed.<div><br></div><div>Mike</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 28, 2015 at 4:26 AM, Chao-Chin Yang <span dir="ltr"><<a href="mailto:chaochinyang@icloud.com" target="_blank">chaochinyang@icloud.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, I am having issues with producing an em-dash in pdf when using tex.  A sample script is as below:<br>
<br>
#!/usr/bin/env python3<br>
import matplotlib.pyplot as plt<br>
import math<br>
import numpy as np<br>
<br>
x = np.linspace(0, 2 * math.pi)<br>
y = np.cos(x)<br>
<br>
plt.plot(x, y)<br>
plt.suptitle(r"abc --- def")<br>
plt.savefig("test.pdf")<br>
plt.show()<br>
<br>
I have customized rc parameters:<br>
<br>
backend = “TkAgg”<br>
font.family = “serif”<br>
text.usetex = True<br>
image.cmap = “CMRmap"<br>
<br>
The plot rendered on screen looks fine.  However, there are some weird characters showing up right before the em-dash in the saved pdf, as attached here.<br>
<br><br>
<br>
I am using Linux Mint 17.3, and uname -a gives<br>
<br>
Linux Eridanus 3.19.0-32-generic #37~14.04.1-Ubuntu SMP Thu Oct 22 09:41:40 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux<br>
<br>
I am using python 3.4.3 + matplotlib 1.3.1, the latter of which is kind of old, but still remains the latest in the Ubuntu LTS repository.  On the other had, I have installed the texlive-full package, which should include all the tex related packages.  My dvipng is 1.14, and my ghostscript is 9.10.  I have also tried different backends like Agg or PDF, but it makes no difference.<br>
<br>
I have tried googling around for similar issues, but had no luck.<br>
<br>
It would be very much appreciated If anyone had some idea how this comes about.<br>
<br>
Sincerely,<br>
Chao-Chin<br>
<br>
<br>_______________________________________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@python.org">Matplotlib-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Michael Droettboom<div>Continuum Analytics</div></div></div>
</div>