How to plot a density/heat map over an external image?
7 次查看(过去 30 天)
显示 更早的评论
Dear All,
I need to plot a density/heat map over an external image. I will import a PNG image of a specif area map, with a determinated x and y axis. The x and y corresponds to the longitude and latitude of my points.
I need something like the image below.

Thank you all, Thomaz
0 个评论
回答(1 个)
Walter Roberson
2016-2-15
plot your heat map first (it is easier.) Then
hold on
imh = image(YourImageArray);
uistack(imh, 'bottom');
hold off
Doing it in this order saves you from having to undo the automatic setting of axes YDir to 'reverse' that image() would normally do for you.
Note: you might find that you want to image(flipud(YourImageArray))
另请参阅
类别
在 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!