How to modify font size in a miller projection map?

조회 수: 1 (최근 30일)
Robert
Robert 2018년 9월 18일
댓글: Robert 2018년 9월 18일
Hi,
Wondering how to modify the font size of the text for the longitudes in a miller projection map?
Thanks!

답변 (1개)

Walter Roberson
Walter Roberson 2018년 9월 18일
편집: Walter Roberson 2018년 9월 18일
Example,
NewSize = 7; %default is typically 10
landareas = shaperead('landareas.shp','UseGeoCoords',true);
ax = axesm ('miller', 'Frame', 'on', 'Grid', 'on');
geoshow(landareas,'FaceColor',[1 1 .5],'EdgeColor',[.6 .6 .6]);
mlabel on
set( findobj(ax.Children, 'Tag', 'MLabel'), 'FontSize', NewSize)
Note that this will probably end up shifting the positions of the labels. With the default meridian labels at the top of the graph, the text is generated with VerticalAlignment 'bottom', but with positions just outside the axes. Effectively the text position has been set to have its bottom at the top of the box. If you wanted the text to move further away from the top of the axes box, then the Position properties would need to be changed.
  댓글 수: 3
Walter Roberson
Walter Roberson 2018년 9월 18일
Could you give example code that creates the labels at the center of the world map?
To change to every 60 degrees try
mlabel('MLabelLocation', 60)
Robert
Robert 2018년 9월 18일
Thanks! I found that the labels at the center of the world map were created with a pcolor plot. So I was able to remove those. Thanks!

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

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by