Map axis description (degrees).
7 ビュー (過去 30 日間)
古いコメントを表示
Welcome. At the beginning, I apologize for my English.
Below is a fragment of the matlab code:
landareas=shaperead('landareas.shp','UseGeoCoords',true);
axesm ('mercator','Frame','on','Grid','on');
geoshow(landareas,'FaceColor',[1 1 .5],'EdgeColor',[.6 .6 .6]);
showaxes;
xtixr = get(gca, 'XTick');
xtixlbl = regexp(sprintf('%.1f°\n',xtixr*180/pi), '\n', 'split');
set(gca, 'XTick', xtixr, 'XTickLabel',xtixlbl)
ytixr = get(gca, 'YTick');
ytixlbl = regexp(sprintf('%.1f°\n',ytixr*90/pi), '\n', 'split');
set(gca, 'YTick', xtixr, 'YTickLabel',ytixlbl)
hold on
As a result I get this:

But I need something like that:

How to improve my code to get meridians and parallels at regular intervals? (picture number 2).
The second question is how to put the description of the axis so that it covers only the drawing window? (as in the second image) In the range from 0 to 180 degrees (horizontal) and from 0 to 90 degrees (vertically)?
0 件のコメント
採用された回答
jonas
2018 年 5 月 25 日
It is easier than you think, try this
landareas=shaperead('landareas.shp','UseGeoCoords',true);
axesm ('mercator','Frame','on','Grid','on',...;
'FLatLimit',[-90 90],...
'FLonLimit',[-180 180])
gridm('on');axis off;mlabel on;plabel on
geoshow(landareas,'FaceColor',[1 1 .5],'EdgeColor',[.6 .6 .6]);
set(gca,'position',[0 0 1 1])
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!