Update:
Link to my test dataset
I have some data like this:
10.0 11.0 0.5
10.0 12.0 0.5
10.0 14.5 0.5
10.0 16.0 0.5
10.0 18.5 0.5
10.0 19.0 0.5
10.0 19.5 0.5
10.0 20.0 0.5
Using Gnuplot, I could plot the following picture:
using the following script I wrote:
set data style lines
set surface
set dgrid3d 30,30
set hidden3d
set ticslevel 0.8
set isosample 40,40
set view 60, 30, 1, 1
set contour base
splot "dataset" using 2:1:($3) notitle
I am trying to do some analysis on this graph so wanted to get this into Matlab but am not sure how to draw this. I tried importing the dataset into Matlab and this is how far I could get. I am loading the file and plotting using the following Matlab statements:
load data
rangeY = floor(min(data(:,2))):.5:ceil(max(data(:,2)))
rangeX = floor(min(data(:,1))):.5:ceil(max(data(:,1)))
[X,Y] = meshgrid(rangeX,rangeY)
Z = griddata(data(:,1),data(:,2),data(:,3),X,Y, 'cubic')
surf(X,Y,Z)
The picture looks quite different to me (axis range, shape etc.) Can someone tell me how to get a plot similar to the one I obtained through Gnuplot?
surfc
would simply draw the contours on the x-y plane, but it wouldn't solve his problem. – Principalities