ListPlot3d isn’t showing surface from data

I’m trying to make contour plot or 3d surface plot from Excel data file. The data comes from an XLSX file which contains x values in the first row and y values in the first column, for a 354 by 256 matrix of z value points. I think, I’ve created 3 dimensional list data ({x,y,z}), but neither ListPlot3d, nor ListContourPlot show anything, just empty plot areas.

Here’s my code:

raw1 = Import[NotebookDirectory[] <> "try.xlsx"][[1]];

dims2 = Dimensions[raw1];

xlist1 = raw1[[1, 2 ;;]];
ylist1 = raw1[[2 ;;, 1]];
zlist1 = raw1[[2 ;;, 2 ;;]];

xlistdim = dims2[[2]] - 1;
ylistdim = dims2[[1]] - 1;

data2 = Table[{xlist1[[x]], ylist1[[y]], zlist1[[y, x]]}, {x, 
    Range[xlistdim]}, {y, Range[ylistdim]}];
plotdata2 = Flatten[data2, 1];

All I get is this:

1qvhJ ListPlot3d isnt showing surface from data

I’m pretty sure, that it’s a simple problem, but I haven’t been able to find answer/solution to this hole day.

If this helps, data is available here: data


Let’s block ads! (Why?)

Recent Questions – Mathematica Stack Exchange