gnuplot on Canvas widget

B

Blues

Hey,

I have used two great models - Tkinter and Gnuplot.py - for a while. I
can display an image on a Canvas widget using Tkinter and I can also
generate a gnuplot from Python on the fly in a separate window. Does
anyone know how to display such a gnuplot on the Canvas widget with an
image in it? Thanks.

Michael
 
J

Jonathan Ellis

Blues said:
I have used two great models - Tkinter and Gnuplot.py - for a while. I
can display an image on a Canvas widget using Tkinter and I can also
generate a gnuplot from Python on the fly in a separate window. Does
anyone know how to display such a gnuplot on the Canvas widget with an
image in it? Thanks.
From my experience, the Gnuplot module isn't designed to be used in
"headless" mode -- it can save to the usual formats, but you have to
render everything in an x11 window interactively first.
It might not be hard to modify this, though.

-Jonathan
 
F

Fernando Perez

Jonathan said:
"headless" mode -- it can save to the usual formats, but you have to
render everything in an x11 window interactively first.
It might not be hard to modify this, though.

That's not correct. I have tons of Gnuplot.py based scripts which write
directly to EPS output, without ever opening a gui window. Note that Gnuplot
still tries to initialize the X11 terminal at startup, so they would require
modifications to run over ssh without X forwarding.

The default plot() command in Gnuplot.py doesn't make it too convenient to do
this, but it's possible. The Gnuplot support in ipython
(http://ipython.scipy.org) extends the syntax of the plot() command to make
it trivial to render to EPS without a terminal. It shouldn't be hard to
modify this to render to other formats, while avoiding opening an X11 window.

Best,

f
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top