From: Michael H. <mh...@ka...> - 2004-06-29 06:18:06
|
Marc Hodapp wrote: > I get a colored 3d plot with x,y,z and z as colored values on the > surface. Somehow the val- values are not shown on the colored surface. > Is this due to the implementation of Data? Or did I misunderstand > something? > [...] > g.title('test') > g('set pm3d') > g('set term X11') > g.splot(Gnuplot.Data(asd, inline=1)) > raw_input() > > All I got on the colored surface where values ranging from 0 to 2 > instead of values from 10 to 30 . I guess you also need the "using" argument to tell gnuplot to use all 4 columns: >>> Gnuplot.Data(asd, inline=1, using=(1,2,3,4,)) General advice for debugging problems: To see exactly what is happening, initialize the Gnuplot object with debug=1; i.e., >>> g = Gnuplot.Gnuplot(debug=1) This causes the Gnuplot object to print out each of the commands that it is sending to gnuplot. Also create the Data object explicitly then ask it to print out its content: >>> d = Gnuplot.Data(asd, inline=1, using=(1,2,3,4,)) >>> print d.content >>> g.splot(d) The print statement outputs the same data that will be sent to gnuplot via the "inline" mechanism. Now you know everything that is being sent to gnuplot. If what you see differs from what you need to have sent to gnuplot, let us know the difference and we'll try to get you from here to there :-) Michael -- Michael Haggerty mh...@al... |