[SciPy-user] plotting with gplt

Robert Kern rkern at ucsd.edu
Wed Oct 5 05:07:50 CDT 2005


Daniel R. Rohr wrote:
> Hi list
> 
>  I'm trying to plot some of my data. e.g. like this
> 
>>>> import scipy
>>>> a = [0,1,2,3]
>>>> b = [[0,1,2,3],[1,2,3,4],[2,3,4,5]]
>>>> scipy.gplt.plot(a,scipy.transpose(b))
> 
> Then I get three lines in different colors. Now I'd like to name these
> graphs and maybe change the colors. Also I'd like to change the range of
> the x- and y-axis. Basically I'd like to use all the features of gnuplot
> with this python interface.

There are other, fuller interfaces to Gnuplot that you should be using
instead. gplt was designed to expose a relatively simple interface that
was the same as plt and xplt, which use different backends. They are now
deprecated and won't be supported in the future (although xplt seems
like it will be spun out on its own). Google for "python gnuplot" and
also look at some of the improvements provided by ipython.

  http://ipython.scipy.org/doc/manual/node15.html

You may also want to consider using matplotlib, instead.

  http://matplotlib.sourceforge.net

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter



More information about the SciPy-user mailing list