Python Graphing Utilities.

Fernando Perez fperez.net at gmail.com
Wed May 11 14:08:55 EDT 2005


Torsten Bronger wrote:

> Hallöchen!
> 
> Fernando Perez <fperez.net at gmail.com> writes:
> 
>> [...]
>>
>> And I'd also second the matplotlib suggestion, to which I've by
>> now fully switched after years of faithful gnuplot usage.
>> Matplotlib is very good, has an active development community, and
>> it is designed from the ground up not only as a library for
>> rendering plots to screen/disk, but also for embedding into guis
>> (with support for Tk, WX, GTK, QT and FLTK).
> 
> Why not for Gnuplot, by the way?
> 
> On sceen, matplotlib looks extremely good, however, I still need
> Gnuplot for the hardcopy version[*].  It *seems* to me that the
> programming interfaces are quite different, so a Gnuplot backend for
> matplotlib would be helpful for me.

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.  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.

I used gnuplot for about 14 years, so I'm not about to bash it: it's a
fantastic tool.  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.  And John Hunter (matplotlib's author) has
been _extremely_ receptive to my long list of "gnuplot has this and I won't
switch to matplotlib until you add it" requests.  Today, mpl has a number of
things which have been added by explicitly trying to match either features,
performance or quality against gnuplot after my repeated pestering to him. 
Given these improvements (many of them quite recent), I finally made the
switch and I'm extremely happy.  Even though rough edges remain (like the tex
support), I'm confident that the quality of the library and the team behind it
is such, that they'll be overcome in short order.

But again, this shouldn't be read as anything against gnuplot: it's a very good
tool, M. Haggerty's python support makes it a pleasure to use from python, and
if it does what you need, by all means use it!  I just wanted to fill in a bit
the picture regarding matplotlib, just to be fair to John and his dedicated
team.

Regards,

f




More information about the Python-list mailing list