|
From: Ryan N. <rne...@gm...> - 2013-02-26 06:02:02
|
On 2/25/2013 9:29 PM, Gökhan Sever wrote:
> Hello,
>
> For some reason, I can't get the degree sign showing up in my ps output:
>
> Here is the simple test code:
>
> fp = plt.figure(figsize=(8.5, 11))
> fp.text(0.5, 0.5, u"Temperature, ^(0)C", color='black', fontsize=16)
> plt.savefig('test.ps <http://test.ps>', papertype='letter')
> plt.savefig('test.pdf', papertype='letter')
>
> PS output shows Temperature, ?C, however PDF renders degree sign
> correctly.
>
> I can't seem to select the text in PS output, but the text is
> selectable in PDF.
>
> This is probably a font issue, where PDF uses DejaVu, on the other
> hand PS uses a Times type font.
>
> So, how can I adjust matplotlib to save in PS file?
>
> Thanks.
>
> --
> Gökhan
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Gökhan,
I tried your code, and everything worked fine for me. (PythonXY 2.7.3.1
on Windows 7)
However, I usually use the escaped unicode value rather than unicode
characters directly. Does the following work instead:
fp = plt.figure(figsize=(8.5, 11))
fp.text(0.5, 0.5, u"Temperature, \u00B0C", color='black', fontsize=16)
plt.savefig('test.ps <http://test.ps>', papertype='letter')
plt.savefig('test.pdf', papertype='letter')
Just a thought. Hope it helps.
Ryan
|