From: <al...@mm...> - 2006-01-03 16:42:42
|
Hi everybody, I want to use gnuplot.py to represent several "4D" surfaces in the same plot, so I write something like: data1 = [ [ [1,1,z1(1,1),val1(1,1)], [1,2,z1(1,2),val1(1,2)], [1,3,z1(1,3),val1(1,3)], ], [ [2,1,z1(2,1),val1(2,1)], [2,2,z1(2,2),val1(2,2)], [2,3,z1(2,3),val1(2,3)], ], ... ] data2 = [ [ [1,1,z2(1,1),val2(1,1)], [1,2,z2(1,2),val2(1,2)], [1,3,z2(1,3),val2(1,3)], ], [ [2,1,z2(2,1),val2(2,1)], [2,2,z2(2,2),val2(2,2)], [2,3,z2(2,3),val2(2,3)], ], ... ], ... dataN = ... and then, data = [Gnuplot.Data(data1, using=(1,2,3,4), inline = 1), Gnuplot.Data(data2, using=(1,2,3,4), inline = 1), ... Gnuplot.Data(dataN, using=(1,2,3,4), inline = 1)] So, when I go to plot: g = Gnuplot.Gnuplot(debug = 1) g.splot(*data) it seems something works because you can read: gnuplot> splot '-' using 1:2:3:4 notitle, '-' using 1:2:3:4 notitle, '-' using 1:2:3:4 notitle, '-' using 1:2:3:4 notitle, '-' using 1:2:3:4 notitle on your terminal, but only the last surface is plotted, maybe because the (x,y) pairs are the same in data1, data2, ... So, how can I solve this? My target is to see all the 3D points in different colors or something like that... do you understand? Many thanks in advance, and have happy new year! Albert P.S.-the same happens if I type apply(g.splot, data) instead of g.splot(*data) ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ |