Subject | : SAD problem with ploting |
Date | : 2007/02/14(Wed) 14:39:35 |
Contributor | : WangWeizhen < > |
I encounter a problem with ploting a figure in a new window, the code as follows:
FFS;
w = KBMainFrame["w",f,Title->"abc"];
b = Button[f,Text->"abc",Command:>(
w1 = Window[Title->"plot"];
c1 = Canvas[w1];
$DisplayFunction=CanvasDrawer;
Canvas$Widget=c1;
plot1 = Plot[Sin[x],{x,-Pi,Pi}]
)];
TkWait[];
The problem is: When I click the button for the first time, the figure shows; however, if I close the window and click the button again, there is no figure in the new window, and some error message appears.
My SAD is on linux with the version 1.0.10b2, and the version of Tcl/Tk is 8.4.14.
Thanks a lot~