On Mon, Feb 25, 2013 at 11:00 PM, Ryan Nelson <rnelsonc...@gmail.com> wrote:

>  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, ⁰C", color='black', fontsize=16)
> plt.savefig('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
>
> 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', papertype='letter')
> plt.savefig('test.pdf', papertype='letter')
>
> Just a thought. Hope it helps.
>
> Ryan
>

This works fine. However it is easy to remember a superscript o then its
code :) By the way, can you select the text within the PS file?


-- 
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to