Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have data of the form {x,y} for different concentrations. Therefore I added the concentration as z, resulting now in {x,y,z}.

Example data (for concentrations A:1%, B:2%, C:4%):

dataA = {{1, 20, 1}, {2, 19, 1}, {3, 18, 1}, {4, 17, 1}, {5, 16, 1}};

dataB = {{1, 20, 2}, {2, 19.5, 2}, {3, 19, 2}, {4, 19.5, 2}, {5, 16, 2}};

dataC = {{1, 20, 4}, {2, 21, 4}, {3, 20.5, 4}, {4, 19.5, 4}, {5, 16, 4}};

Now I want to make a 3D surface plot from these traces (by 2D-interpolation). How to do that?

Edit: the real data here: dropboxlink

share|improve this question
    
May be ListSurfacePlot3D? (You need at least 10 points) –  ybeltukov Nov 15 '13 at 22:13
    
Thank you, ListSurfacePlot3D seem not to work on my real data. I provided them by editing the question. –  Shukoff Nov 16 '13 at 8:58
add comment

1 Answer

up vote 6 down vote accepted

Perhaps:

r = RotateRight /@ Join[dataA, dataB, dataC];
f = Interpolation[{#[[1 ;; 2]], #[[3]]} & /@ r]; 
Show[{Graphics3D[{PointSize[Large], Point@r}, Axes -> True], 
      Plot3D[f[x, y], {x, 1.`, 4.`}, {y, 1.`, 5.`}]}]

Mathematica graphics

Edit

Here you have your DropBox Data

r0 = Import["c:\\test.xlsx", "Data"]; 
ListPlot3D[ RotateRight /@ Flatten[r0, 1], Mesh -> False,  ColorFunction -> "DarkRainbow"]

Mathematica graphics

share|improve this answer
    
ListPlot3D should suffice, it does interpolation automatically. –  Szabolcs Nov 15 '13 at 22:48
    
@Szabolcs Perhaps, yes. But in cases like this one I always find myself tweaking the options of ListPlot3D[] to get a smooth enough surface. –  belisarius Nov 16 '13 at 1:09
    
Thank you, but all answers seem not to work on my real data. I provided them by editing the question. –  Shukoff Nov 16 '13 at 8:51
    
@Shukoff See edit, please –  belisarius Nov 17 '13 at 13:47
    
@belisarius: Thank you very much! –  Shukoff Nov 17 '13 at 13:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.