[SciPy-user] scipy.gplt versus IPython.GnuplotRuntime

Eni Mustafaraj eni at Mathematik.Uni-Marburg.de
Tue Aug 12 04:15:29 EDT 2003


Fernando Perez wrote:

> I've attached here a simple example of how to use the ipython gnuplot 
> support for scripting plot generation.  If you want, I can send you 
> vastly more complicated examples.

Thanks for the example. It gives me the idea. Only a small correction 
was needed for my gnuplot installation
Instead of the command:
"set style line .... " , the command "set linestyle ...." was necessary, 
otherwise it did not work.

> 3) Can IPython.GnuplotRuntime also output a PNG file? How?
>
> It could, if I coded it :)  Consider it a feature request.
> ...
> Right now, your request goes unfortunately to the bottom of the list. 
> But if you have the time/energy to code it yourself, feel free to send 
> me a patch and I'll gladly include it in the next release.

Well, if I knew how to do it :-). Nevertheless, I tried it the usual 
way, and it seems to work ( I forget sometimes to try first the simplest 
solution).

 >> import IPython.GnuplotRuntime as GP
 >> gp = GP.gp
 >> gp(""" set term png color
          set output "test.png"
          set nokey
          set grid mxtics mytics
        """)
 >> gp.plot(GP.Data(x,y, with='linespoints lt 3 lw 3 pt 6'))

And indeed the PNG file is created. The only problem, which has nothing 
to do with your package, is that in Windows, the "linewidth" command 
does not appear to have effect on the window terminal and the PNG 
output, but it works only for a postscript output.

regards,
Eni





More information about the SciPy-User mailing list