Dear gnuplot experts,
if I have for example a 10x10 matrix like:
0.005 0.383 0.666 0.947 1.258 1.618 1.959 2.185 2.250 2.180
0.153 0.860 1.875 2.945 3.915 4.680 5.048 4.982 4.614 4.139
0.217 1.251 2.932 4.764 6.179 6.880 6.819 6.250 5.533 4.879
0.271 1.619 3.837 6.069 7.347 7.533 6.963 6.145 5.396 4.827
0.320 1.897 4.345 6.407 7.147 6.848 6.117 5.385 4.830 4.459
0.346 1.962 4.201 5.708 5.961 5.523 4.932 4.447 4.134 3.985
0.326 1.756 3.502 4.473 4.521 4.186 3.821 3.570 3.467 3.484
0.273 1.371 2.582 3.184 3.212 3.041 2.873 2.800 2.833 2.952
0.201 0.964 1.750 2.149 2.205 2.153 2.114 2.151 2.263 2.448
0.134 0.633 1.141 1.423 1.504 1.517 1.556 1.644 1.792 1.997
I thought it should be possible to draw a "topological" map with contour
lines.
Searching the web I found this description:
http://stackoverflow.com/questions/20977368/filled-contour-plot-with-constant-color-between-contour-lines
My gnuplot code:
reset
set contour base
set cntrparam level 10
unset surface
set table "Matrix3c.dat"
splot "Matrix3.dat" matrix w l
unset table
set palette maxcolors 10
plot "Matrix3.dat" matrix with image, "Matrix3c.dat" w l lc rgb "black"
Since in my case it is not a continous function but a matrix of 10x10
datapoints I still get a pattern of 10x10 color squares instead of
uniform color areas between the contour lines.
Do I have to interpolate and blow up the 10x10 matrix e.g. to a 100x100
matrix or are there better ways which I do not see?
Thanks for any hints, Theo.
|