Plotting a heatmap with collected data

조회 수: 4 (최근 30일)
jason.dim
jason.dim 2022년 3월 10일
댓글: Simon Chan 2022년 3월 16일
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.
Simon Chan
Simon Chan 2022년 3월 16일
Congratulations.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by