필터 지우기
필터 지우기

generate heat map based on lat/lon and data value

조회 수: 10 (최근 30일)
Ketan Bharucha
Ketan Bharucha 2021년 11월 23일
댓글: Ketan Bharucha 2021년 11월 24일
Hello,
I have a table with Lat/Lon and some error values. I would like to plot the lat/long and create a heatmap using the error value.
lat lon err_d
38.53 -77.40 194.4729
38.75 -77.04 147.9679
39.05 -77.91 340.3928
any help would be greatly appreciated.
Best,
KB
  댓글 수: 6
Ketan Bharucha
Ketan Bharucha 2021년 11월 24일
Thanks for your help.

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

채택된 답변

KSSV
KSSV 2021년 11월 23일
Let T be your grid...
x = T.lon ;
y = T.lat ;
z = T.err_d ;
% Convert the scattered data into grid
m = 100 ; % can be increased
[X,Y] = meshgrid(linspace(min(x),max(x),m),linspace(min(y),max(y),m)) ;
Z = griddata(x,y,z,X,Y) ;
pcolor(X,Y,Z)
shading interp
colorbar

추가 답변 (1개)

Peter Perkins
Peter Perkins 2021년 11월 23일
The heatmap function accepts a table as input, this should be a one-liner. If you are looking for a surface plot, KSSV's answer should work.

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by