[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnuplot-info
Subject:    [Gnuplot-info] Interpolated topographic map from matrix data
From:       theozh <theozh () gmx ! net>
Date:       2015-02-09 21:09:36
Message-ID: mbb7mf$meu$1 () ger ! gmane ! org
[Download RAW message or body]

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.


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
gnuplot-info mailing list
gnuplot-info@lists.sourceforge.net
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic