How to add Border of country on a figure?
88 次查看(过去 30 天)
显示 更早的评论
HI all,
i owuld like to add on the figure below the border fo indonesia country. Does anyone where to download it and how to add it in the code also copied below, please?
Cheers
% add path to matlab functions:
addpath ('C:\Matlab_download\m_map1.4\m_map\');
m_proj('lambert','long',[90 146.64],'lat',[-12 14.15]);
[CS,CH]=m_etopo2('contourf',[-10000:100:0 ],'edgecolor','none');
m_gshhs_f('patch',[.7 .7 .7],'edgecolor','none');
m_grid('linest','none','tickdir','out','box','fancy','fontsize',16);
colormap(m_colmap('blues'));
caxis([-10000 000]);
[ax,h]=m_contfbar([.70 .95],.83,CS,CH,'endpiece','no','axfrac',.05);
title(ax,'meters')
set(gcf,'color','w');
2 个评论
回答(1 个)
Tushar
2023-8-30
Hi Jonathan,
I understand that you would like to add the border of Indonesia on top of the map you have plotted. Have you heard about the "Mapping Toolbox"? I have tried using it on MATLAB R2023a and copied the 'latitude' and 'longitude' data from your code snippet:
%importing land data
land = readgeotable("landareas.shp");
figure;
newmap;
geoplot(land);
geolimits([-12 14.15],[90 146.64]); %from the code shared
As you can see, the borders are accurately plotted using the 'Mapping Toolbox'. There are also ways to customize the appearance of the borders, and I recommend referring to the documentation for more details. Here are some resources that might be useful:
These resources should provide you with valuable information to help you overcome the issue you are facing.
0 个评论
另请参阅
类别
在 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!