469,342 Members | 5,849 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,342 developers. It's quick & easy.

gnuplot on Canvas widget

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

Jul 18 '05 #1
3 2522
Blues wrote:
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

Jul 18 '05 #2
Thanks, Jonathan. Can you please give a little more information here?

Jul 18 '05 #3
Jonathan Ellis wrote:
Blues wrote:
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.


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

Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Mickel Grönroos | last post: by
6 posts views Thread by Gary Richardson | last post: by
3 posts views Thread by Matthias | last post: by
4 posts views Thread by Rama Calaga | last post: by
reply views Thread by John McMonagle | last post: by
reply views Thread by WaterWalk | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.