How to make a 2-D colormap with coordinates
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi. I have n points, for each point I have its latitud, longitude and an indicator that take real values (from 0.5 to 2.7). I would like to make a Figure (like a colormap) that shows with colors the value of this indicator for each of these n points. Is that possible? Thanks in advance for any help.
댓글 수: 0
채택된 답변
추가 답변 (1개)
jonas
2018년 10월 22일
편집: jonas
2018년 10월 22일
Use a surface object
surf(lon, lat, z)
The data must be gridded, so you may have grid the data like this
[LON,LAT] = meshgrid(min(lon):max(lon), min(lat) :max(lat))
Z = griddata(lon,lat, z, LON, LAT)
surf(LON, LAT, Z)
댓글 수: 2
jonas
2018년 10월 22일
just set the view,
view([0 90])
or use one of the following functions with the same syntax as surf
- pcolor
- imagesc
- contourf
- mesh
참고 항목
카테고리
Help Center 및 File Exchange에서 Geographic Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!