By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,887 Members | 954 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,887 IT Pros & Developers. It's quick & easy.

gnuplot on Canvas widget

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
Thanks, Jonathan. Can you please give a little more information here?

Jul 18 '05 #3

P: n/a
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.