[SciPy-user] plotting modules

Arnd Baecker arnd.baecker at web.de
Fri Jun 25 02:23:13 CDT 2004


Moin,

On Thu, 24 Jun 2004, Steve Schmerler wrote:

> > hi there,
> >
> > the scipy documents presently mention three distinct
> > plotting modules (gplt, plt, and xplt), and I'm wondering
> > which one fits my needs best. I'm trying to rewrite some
> > code that has previously been written for matlab,


[... snip - list of requirements and Steve's discussion
     of xplt and plt]

> gplt
> ====
>
> I've played arourd with gplt a bit. If you come from Matlab the syntax may
> be a little strange (or not if you are familiar with gnuplot). For example
>
>    plot(x,y,'w lp')
>
> gives lines with points but the title of the graph is a pathname.
>
>    plot(x,y,'title "" w lp')
>
> removes the annoying title, hmmm. The plots look fine, similar to plt. There
> are some 3D capabilities as it is a wrapper for gnuplot (as you probably
> have read on the scipy-page). On my machine it is the most slow plotting
> package (on Win32, it calls wgnuplot). I havn't tested it on Linux jet.
> I think I exported an .eps with the export(...) function, but it's been a
> while.

An alternative interface to gnuplot is
  http://sourceforge.net/projects/gnuplot-py/
together with Fernando Perez' Ipython
(highly recommended independent of this)
which has some add--ons to Gnuplot.py
(see "Access to gnuplot")
   http://ipython.scipy.org/doc/manual/node12.html

Coming from matlab you should definitively have
a look at matplotlib
  http://matplotlib.sourceforge.net/

A general remark: I am not sure about
the feasability of one plotting tool for all tasks.
For _my_ purposes it boils down to the following
  - quick plots, interactive usage:
       gnuplot or scipy.xplt
  - publication quality 2D graphs:
       gnuplot or PyX (http://pyx.sourceforge.net/)
  - 3D interactive plots:
       gnuplot, geomview (http://www.geomview.org/)
       or MayaVi (http://mayavi.sourceforge.net/)
  - 3D publication quality plots
       This is more tricky (IMHO): Possible toolchains:
          - geomview, RIB output and rendering
          - MayaVI, RIB output and rendering
                  (.ps output etc. of course also exists)
          - gnuplot + postprocessing of the resulting
               big .ps files
  - Embedded plots in GUIs (wxPython, to be honest here):
      - fast plotting of many points: PlottingCanvas
      - or FloatCanvas/wxPyPlot
      - or matplolib (not tested though)

Best,

Arnd



More information about the SciPy-user mailing list