Plotting spatial data in a global map

조회 수: 3 (최근 30일)
Melissa
Melissa 2015년 1월 28일
댓글: Chad Greene 2015년 1월 28일
Hello,
I have a dataset of 555x3 Lat, Lon, and Biomass
The latitude and longitude are not evenly spaced and random
I would like to know how I can visualize on a map where the data falls on a global map with continents outlined. I don't want to see the value of the biomass, rather I would like to just see where on a global map I have data at in order to visualize the spatial expanse of my dataset.
I'm having trouble finding a matlab command that can easily accomplish this. Does anyone know what command meets my needs?
Thank you

채택된 답변

Chad Greene
Chad Greene 2015년 1월 28일
We'll call your data matrix data. Then
lat = data(:,1);
lon = data(:,2);
plot(lon,lat,'bp')
xlabel('longitude')
ylabel('latitude')
will put a blue star at every data point.
  댓글 수: 2
Melissa
Melissa 2015년 1월 28일
Thank you Chad,
Is there a way that I could see it spread out across a global map with continents?
Chad Greene
Chad Greene 2015년 1월 28일
Do you have the Mapping Toolbox? If yes, use worldmap to initialize a map, choose your method of plotting a coast, then use plotm(lat,lon,'bp') to plot blue stars at all your data points. If you do not have the mapping toolbox, M_Map works just as well.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by