How to plot a density/heat map over an external image?

7 ビュー (過去 30 日間)
thomaz lascala
thomaz lascala 2016 年 2 月 15 日
コメント済み: thomaz lascala 2016 年 2 月 16 日
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

回答 (1 件)

Walter Roberson
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))
  1 件のコメント
thomaz lascala
thomaz lascala 2016 年 2 月 16 日
Dear Walter,
How can I plot the heat map? I tried different functions and neither one returned what I want.
My latitudes and longitutes are imported from a csv file, I removed the extras coluns in order to become a 238x2 cell and after it I convert it to a 238x2 double.
My latitudes and longitudes are in decimal degress, the extra imagem that I want to plot over has to be limited to the latitudes and longitudes of the real map in order to keep the right position of each point.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeColor and Styling についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by