Question

How can I plot (a 3D plot) a matrix in Gnuplot having such data structure. I cannot find a way to use the first row and column as a x and y ticks (or to ignore them)

,5,6,7,8
1,-6.20,-6.35,-6.59,-6.02
2,-6.39,-6.52,-6.31,-6.00
3,-6.36,-6.48,-6.15,-5.90
4,-5.79,-5.91,-5.87,-5.46

Is the splot 'data.csv' matrix the correct parameter to use ?

Was it helpful?

Solution

You can give using a format specification; here we need to tell the seperator ','. The following works for me:

splot 'data.csv' using 1:2:3 '%lf,%lf,%lf,%lf' with linespoints pt 6 ps 2 lw 3

except that the first line is ignored, which is probably right?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top