[SciPy-user] gplot documentation

John Hunter jdhunter at ace.bsd.uchicago.edu
Sun Aug 15 13:02:30 CDT 2004

>>>>> "Alan" == Alan G Isaac <aisaac at american.edu> writes:

    Alan> This post was extremely useful.  One ambiguity remained for
    Alan> me: are you suggested PyX remains better than Matplotlib if
    Alan> you need LaTeX equations in your EPS files?

matplotlib and pyx take different approaches to mathtext.  PyX uses
TeX to typeset the mathematical expressions, and so by definition has
full TeX support and awesome rendering.  matplotlib uses a custom
parser and layout engine, and does not support the full range of TeX
expressions (eg there is no \frac command yet).  Also, TeX does
superior layout - I don't pretend to be Donald Knuth, nor did I spend
10 years working on it :-)

So if you need the full power of TeX, only need ps/eps output, and
have access to a TeX install on all the platforms on which you work,
PyX will be the better choice.

What matplotlib offers vis-a-vis mathtext that pyx doesn't is

  * totally self contained solution - no extra packages required.
    Cross platform, etc.

  * mathtext for non-PS outputs (PNG, GUI window) in addition to
    PS/EPS.  Thus you can use mathtext anywhere in your figure in any
    GTK/WX/Tkinter/FLTK application or save it to hardcopy PNG, eg for
    a powerpoint presentation.

matplotlib uses the computer modern fonts, so the equations will look
very similar to TeX equations.  And while there is nothing like full
TeX support, there is nonetheless substantial support: almost all of
the TeX symbols, over/under subscripting with {} groups, fonts,
... see http://matplotlib.sourceforge.net/matplotlib.mathtext.html for
more info.

Hope this helps,

More information about the SciPy-user mailing list