Plotting a heatmap with collected data

7 次查看(过去 30 天)
I have an image of a map with data allocated to different points on the map. Am I able to get co-ordinates of that image to place the data it's allocated spots and produce a heatmap over the image? Perhaps there is a better way of doing this?
  4 个评论
KSSV
KSSV 2022-3-10
Okay can be done...Have a look on geoscatter.
jason.dim
jason.dim 2022-3-10
Thanks for the help. I will look into it.

请先登录,再进行评论。

采纳的回答

Simon Chan
Simon Chan 2022-3-10
Use function pcolor is another option.
clear;clc;
im = imread('map.png');
[Ny,Nx,Nc] = size(im);
f = figure(1);
ax = gca;
minSignal = 20;
maxSignal = 800;
X = repmat(linspace(minSignal,maxSignal,Nx),Ny,1); % Dummy data only
h = imagesc(ax,1:Nx, 1:Ny,im);
hold(ax,'on');
s=pcolor(ax,X);
s.FaceColor = 'interp';
s.FaceAlpha = 0.5;
s.EdgeColor = 'none';
axis(ax,'image');
cmap = colormap(ax,hsv);
cb = colorbar(ax);
title(cb,'Signal Level');
axis(ax,'off');
  17 个评论
jason.dim
jason.dim 2022-3-15
Everything is complete. Thanks for all the help.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Colormaps 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by