|P is for Practical|
gnuplot output to tkcanvasby tallulah (Novice)
|on Nov 20, 2009 at 08:12 UTC||Need Help??|
tallulah has asked for the
wisdom of the Perl Monks concerning the following question:
i am running winxp with perl 10, and have tried to run gnuplot to output the plot to the tkcanvas , i have used zentara example here http://www.perlmonks.com/?node_id=592246 to produce a nice picture http://img695.imageshack.us/img695/3775/plot.jpg, the code is listed below,
just 3 problems, in the first run of the program i have an error message :""Use of uninitialized value in subroutine entry at "" ie about the line "$gnuplot->($canvas);"
in the second run the program run without problems; it seems it is running the previous created plot.pl.
second problem: is that once exited the gnuplot still running in memory; how to close it and all the processes.
the third problem: it seems that the tkcanvas can't display 3D plots such as plotting "splot sin(x*y/20)\n"
on the other hand in the same zentara page there is a second solution to plot the graphic directly to the canvas, i was not able to run the code ,just the canvas without plot, the same is the superformula example http://www.perlmonks.com/?node_id=592338 i got an error message (open3: Can't locate auto/Tk/ROText/FILENO.al in @INC (@INC contains: c:/perl/sit e/lib c:/perl/lib .) at c:/perl/site/lib/Tk/Derived.pm line 469 ) related to the presence of "tie(*STDOUT, 'Tk::Text', $text);" i wish zentara or someone to make those examples available for windows systems, thanks
at last i have found a nice example in the book "Gnuplot in Action" to run gnuplot from perl: it is directing the output to graph.png file http://img412.imageshack.us/img412/1378/grapht.png
thanks for your patience