Hmm, I have no idea what is wrong and I'm afraid that there is not
much I can do.
ps backend undergoes several steps (tex - dvi - ps - [distiller]) to
produce the final output, and it is hard to track down the problem
without actually reproducing one.

Just in case, can you change your distiller option and see if it makes
any difference?

rc("ps", usedistiller="ghostscript") # this would be the default

or

rc("ps", usedistiller="xpdf")

-JJ



On Wed, May 13, 2009 at 3:22 AM, Matthias Michler
<matthiasmich...@gmx.net> wrote:
> Hi Jae-Joon,
>
> I updated to svn-revision 7099 and the problem (hidden part of b) still
> exists. Do you have any idea what I'm doing wrong?
>
> Thanks in advance for any hints.
>
> best regards Matthias
>
>
> On Tuesday 12 May 2009 20:46:06 Jae-Joon Lee wrote:
>> On Tue, May 12, 2009 at 5:04 AM, Matthias Michler
>>
>> <matthiasmich...@gmx.net> wrote:
>> > Hello list,
>> >
>> > I'm not sure that following problem also occurs for Sebastian, but if I
>> > use PS-backend in the below script I get the attached output, where the
>> > upper part of the b is somehow hidden (matplotlib-version 0.98.6svn).
>> > Is this a problem of matplotlib or did I miss something in the
>> > tex-handling?
>>
>> Unfortunately, I don't see such problem, although the problem seems to
>> be due to a wrong bounding box.
>>
>> Are you using the most recent svn? There has been some recent changes
>> in ps backend. Before the changes (r7068, r7074), the ps backend tried
>> to adjust the bounding box of the output ps file. However, as far as I
>> can see, this often gave a wrong bounding box (and I guess your
>> problem might be related with this issue). The above mentioned changes
>> somehow bypass that bbox adjustment. The resulting bounding box should
>> have the size of the figure if saved in eps, or size of the paper
>> ("letter" or "a4", I guess) if saved in ps.
>>
>> regards,
>>
>> -JJ
>>
>> > best regards Matthias
>> >
>> >> ----------------------------------------
>> >
>> > from matplotlib import use, rc
>> > use('PS')
>> > from pylab import figure, savefig
>> >
>> > rc('text', usetex=True)
>> > rc('text.latex', preamble="\usepackage{color}")
>> >
>> > f = figure()
>> > f.text(0.5, 0.5, r"{\color[rgb]{0,1,0} a } b {\color{blue} $\nu, \mu,
>> > \tau$}")
>> >
>> > savefig('test_tex_color.ps')
>> >
>> >> ----------------------------------------
>> >
>> > On Monday 11 May 2009 20:36:58 Jae-Joon Lee wrote:
>> >> > The resulting graph is not colored -- but in the directory
>> >> > ~/.matplotlib/tex.cache/ the text is green, both in the dvi and the
>> >> > png file!
>> >> >
>> >> > It therefore seems to me that this is not completely hopeless but I
>> >> > cannot figure out how to proceed.
>> >>
>> >> As far as I know, in matplotlib, all the tex png output is treated as
>> >> grey  internally (the only exception I know of is ps backend, e.g.,
>> >> your example will show you a correct color if you save it as ps). I
>> >> guess this may have been a design decision.
>> >> As far as I can see, MPL currently does not support texts with varying
>> >> font properties (size, color, font).
>> >> One possible workaround for this could be using the latex typesetting
>> >> as you tried. However, supporting this within the current text
>> >> framework of matplotlib would be difficult and may not be a good idea.
>> >>
>> >>
>> >> However, I guess there are a few workarounds you may consider to use
>> >> (but unfortunately I think none of them are easy to work with). So, if
>> >> you describe where you intend to use multi-color text, I'll try to
>> >> give some example appropriate for your situation. Multi-color text in
>> >> figure title or simple annotation would be relatively simple.
>> >> Multi-color text in legend label seems to be more difficult, but
>> >> should be doable.
>> >>
>> >> -JJ
>
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to