|
From: Daniel J S. <dan...@ie...> - 2004-09-07 07:30:41
|
Oops, didn't mean to send the patch to the list... Anyway, I see that the frames created by tcl/tk have a background that interferes with the drawn plot. That is, the plot draws fine, but then if you move the window, the background is drawn and covers up the plot. Here is a trick to get rid of the background: % set colour "" % . configure -background $colour % frame .myframe -background $colour Then run gnuplot, "set term x11 window" etc. and everything is hunky dory. Can someone offer up a simple little tcl/tk demo to illustrate the use of this? Say, a program that looks in /demo subdirectory and generates a selection box containing all the files ending in ".dem". On one side is the widget for selecting the demo. Right next to that is the plot window showing the results for the demo. Oh, and a button underneath the selection box saying "next" which is the equivalent of return so one could step through the plots in the demo. Something like that? If it sounds like more work than an hour or so, forget it. Just looking at the tk8.3 demos (cool stuff!), image2.tcl comes pretty close except the image would be replaced by a window hooked up to gnuplot. I'm impressed by the tk8.3 demo for a canvas. The objects can be moved around... And now I know what the "tkcanvas" terminal is. Dan |