PyX, matplotlib, 3D & LaTeX

Fernando Perez fperez.net at gmail.com
Fri Jul 8 12:02:25 EDT 2005


Francisco Borges wrote:

> I like PyX, use it a lot and would suggest it as a beter plotting
> library than the ones at Scipy (for as long as you don't need on-screen
> plotting).

FWIW, the plotting support in scipy is essentially unmaintained and abandoned,
since the advent of matplotlib.  It hasn't been officially deprecated, though
I'm wondering if perhaps we should do that just to save users the aggravation.

> I just saw matplotlib this week while searching for something that
> would do 3D, it seemed pretty nice and it does have many more features
> than PyX, is certainly more mature than PyX and more high level.

I use both extensively, so I can comment a bit: matplotlib is a fantastic
_plotting_ library, and it has very extensive support for doing all kinds of
plotting-related things easily and with high output quality.  As of v. 0.82,
its latex support is on-par with Pyx's, since now you can set it to do _all_
your text rendering (including ticks, numbers, etc.) via latex.  It gets a bit
slower (much like pyx), but the quality is perfect (it's true latex running
underneath).

Besides, matplotlib provides widgets for on-screen rendering and embedding into
GUI applications, something which can be very important, and outside pyx's
domain of interest.

Where pyx shines is for generating what I call 'diagrams' for lack of a better
term: drawings that don't fall well into the model of 'plot these data points
at these coordinates' but that rather involve algorithmically-driven
positioning of geometric elements.  This power is best seen (despite my poor
description) by just looking at the pyx examples page, which shows how even
relatively complex diagrams can be done in pyx with very little code, and give
stunning results.

While you can plot with pyx, and draw with matplotlib, I feel that they each
have their strengths, and I use both.  I love both, and I feel they complement
each other extremely well.

For 3d plotting in python, VTK and mayavi are my workhorses, and I'm quite
happy with that solution so far.

> On the other hand PyX: LaTeX support seems to be way ahead and it can
> be used to draw (very funky) figures.

[have a look at recent matplotlib for proper latex]

Cheers,

f




More information about the Python-list mailing list