From: David C. <da...@ne...> - 2003-01-10 14:16:40
|
On 1/10/03 8:32 AM, "David Casti" <da...@ne...> wrote: > My question: how do I get the output of gnuplot to go into a gif, png or > jpeg file? I believe I have compiled and installed all of the correct > components to make this possible... but I just don't know where to throw the > switch. Can someone give me a quick pointer? I asked too soon... turns out this is not hard at all -- import Gnuplot, Gnuplot.funcutils g = Gnuplot.Gnuplot( debug=1 ) g('set term png') g('set output "/tmp/david.png"') g.plot( [ [0, 1], [1, 2], [2, 3], [3, 4] ] ) -- and observe the output file in /tmp/david.png. It appears that jpeg and gif support is going to be trickier... because "set terminal" at the gnuplot command prompt does not show those to be available terminal types. Once I figure out how to make them available, the way to use them in gnuplot.py is clear. I hope this post helps a future gnuplot.py user! :) David. |