Python Graphing Utilities.

Fernando Perez fperez.net at gmail.com
Wed May 11 17:27:25 EDT 2005


Torsten Bronger wrote:

> Hallöchen!
> 
> Fernando Perez <fperez.net at gmail.com> writes:
> 
>> [...]
>>
>> Well, it's true that the latex-type (called mathtext) support in
>> matplotlib is not really up to par with true latex (kerning is off
>> in places, mixed text/math doesn't work well, etc).  I've been
>> willing to live with it so far, but an alternative option is to
>> use the PS backend and then play psfrag tricks.
> 
> The problem is that mostly, you'll have a *lot* to substitute.
> 
>> I've yet to experiment with it, but it might (with some additional
>> handywork) give final results identical to those of the pslatex
>> backend in gnuplot.
> 
> What do you mean with this?  Do you want to mimic TeX's quality as a
> typesetter, or do you think the goal should be output in real LaTeX
> format (like pslatex does)?  The latter would be more useful in my
> opinion, and much easier, too.

Easier... psfrag tricks can be done right now, while full latex output requires
writing a new matplotlib backend.  It would certainly be a _great_ project,
but not one I'm about to undertake, while it's reasonable for me to use psfrag
to fix a few labels here and there to use proper latex.  So while I agree with
you that in the long run a latex backend would be ideal, as a stop-gap
solution I can live with psfrag.
 
>> [...]  But there are a number of things it simply can't offer due
>> to its design as a standalone program, which matplotlib (being a
>> library/widget collection) can do much better.  [...] I finally
>> made the switch and I'm extremely happy.
> 
> I'm not a fanatic Gnuplot user either.  I use it for 11 years, and I
> like exactly two things about it: its simplicity and the pslatex
> backend.  I think for my thesis I'll still use it, because its
> integration in a batch process that builds my thesis is much easier
> than to write Python programs.

well, unless your batch process _is_ in python :)  Mine was, so my
make_plots.py was a single script, which ironically (for this discussion) was
all gnuplot.py-based, since this was a few years ago.

Cheers,

f




More information about the Python-list mailing list