How can I get use property colormap from heatmap to color the data points of (x,y) based on the values from r?
5 次查看(过去 30 天)
显示 更早的评论
How can I use colormap(hot) to color the data points of (x,y) based on the values from r?
x = 150:50:5000;
y = -x+2000/5;
a = 30;
b = 0;
r = a+(b-a)*rand(1.length(x));
allData = [x;y;r];
figure;
heatmap(x,y, 'colormap', hot)
xlim([min(x) max(x)])
ylim([min(y) max(y)])
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Color and Styling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
