Help to create a continuous surface heatmap
15 次查看(过去 30 天)
显示 更早的评论
Dear experts -
I want to create a continuous 1D surface heatmap for every data point, with Distance (ft) in the X-direction and Temperature in the Y-direction. I have no idea how to do it. Please, can someone helps me with that.
Here I attached a sample of my data.
Thank you!
采纳的回答
Voss
2024-8-19
I'm not sure what a 1D surface looks like.
If Temperature is in the Y-direction, what variable should be used for the color of the surface?
Here I use all T0-T14 as the color data, Distance as X, and 1 through 15 as Y. Adjust as necessary.
data = readtable('data.xlsx','VariableNamingRule','preserve');
T = data{:,"T"+(0:14)};
X = data{:,"Distance (ft)"};
Y = 1:15;
surface(X,Y,T.')
axis tight
xlabel("Distance (ft)")
ylabel("1 - 15")
cb = colorbar();
cb.Label.String = "Temperature";
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Colormaps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!