tkinter gnuplot

Fernando Perez fperez528 at yahoo.com
Wed Nov 10 17:31:10 EST 2004


Rama Calaga wrote:

> Hi, I use both python and gnuplot a lot, but I am
> unable to find a way to embed gnuplot "window/canvas" into tkinter. BLT
> option in PMW is not so powerful and not so great, any suggestions ??

I don't think there's an easy way to do that, since all access to gnuplot from
python is via a pipe. Gnuplot is an external program, not a library.  You
might be able to make gnunplot generate .pngs and then load those into a tk
canvas, but it will be clumsy.

You might want to look at http://matplotlib.sourceforge.net.  It's a true
python plotting library (as opposed to a pipe to an external program), set up
from the get-go for GUI embedding (with Tk, GTK and WX examples included).

Best,

f



More information about the Python-list mailing list