[Matplotlib-users] em-dash not correctly displayed in saved pdf when using tex
Chao-Chin Yang
chaochinyang at icloud.com
Wed Jan 6 09:09:20 EST 2016
Here is my locale:
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=sv_SE.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=sv_SE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=sv_SE.UTF-8
LC_NAME=sv_SE.UTF-8
LC_ADDRESS=sv_SE.UTF-8
LC_TELEPHONE=sv_SE.UTF-8
LC_MEASUREMENT=sv_SE.UTF-8
LC_IDENTIFICATION=sv_SE.UTF-8
LC_ALL=
I hope this helps.
Sincerely,
Chao-Chin
On 01/06/2016 03:06 PM, Thomas Caswell wrote:
> What is the default encoding on your system? I wonder if in
> `draw_tex` or `dvi_read` we are transcoding the text?
>
> Tom
>
> On Wed, Jan 6, 2016 at 8:56 AM Michael Droettboom
> <mdroettboom at continuum.io <mailto:mdroettboom at continuum.io>> wrote:
>
> I can't reproduce with matplotlib master, suggesting this bug has
> already been fixed.
>
> Mike
>
> On Mon, Dec 28, 2015 at 4:26 AM, Chao-Chin Yang
> <chaochinyang at icloud.com <mailto:chaochinyang at icloud.com>> wrote:
>
> Hi, I am having issues with producing an em-dash in pdf when
> using tex. A sample script is as below:
>
> #!/usr/bin/env python3
> import matplotlib.pyplot as plt
> import math
> import numpy as np
>
> x = np.linspace(0, 2 * math.pi)
> y = np.cos(x)
>
> plt.plot(x, y)
> plt.suptitle(r"abc --- def")
> plt.savefig("test.pdf")
> plt.show()
>
> I have customized rc parameters:
>
> backend = “TkAgg”
> font.family = “serif”
> text.usetex = True
> image.cmap = “CMRmap"
>
> 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.
>
>
>
> I am using Linux Mint 17.3, and uname -a gives
>
> 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
>
> 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.
>
> I have tried googling around for similar issues, but had no luck.
>
> It would be very much appreciated If anyone had some idea how
> this comes about.
>
> Sincerely,
> Chao-Chin
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org <mailto:Matplotlib-users at python.org>
> https://mail.python.org/mailman/listinfo/matplotlib-users
>
>
>
>
> --
> Michael Droettboom
> Continuum Analytics
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org <mailto:Matplotlib-users at python.org>
> https://mail.python.org/mailman/listinfo/matplotlib-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20160106/dc35a9a2/attachment-0001.html>
More information about the Matplotlib-users
mailing list