Displaying latitude and longitude on grid lines

Hi,
I have an ortho map projection with latitude and longitude grid lines and I want to display the degrees of latitude and longitude on the x and y axes. I have tried using axesm but it just alters the range of the axes which I don't want to change.
Here is my coding:
-----------
load coast
figure;
axesm('MapProjection','ortho','origin',[-20,-75])
framem
plotm(lat,long,'k')
gridm
[gLat,gLon]=meshgrid(-20:-1:20,0:359);
plotm(lat_A,lon_A,'r')
hold on
plotm(lat_B,lon_B,'b')
hold on
plotm(lat_C,lon_C,'g')
xlabel('{\bfLongitude [degrees]}')
ylabel('{\bfLatitude [degrees]}')
title ('{\bfFlight Track}')
----------
Thanks

1 件のコメント

Anna
Anna 2013 年 8 月 3 日
Can anyone help? I'm sure there's a simple solution, I just can't see it.

サインインしてコメントする。

 採用された回答

Cedric
Cedric 2013 年 8 月 3 日
編集済み: Cedric 2013 年 8 月 3 日

1 投票

If I understand well your question, I would manage to do it using AXESM labeling properties.
Full description at the bottom of http://www.mathworks.com/help/map/ref/axesm.html
To illustrate, replace your call to AXESM with the following:
axesm('MapProjection', 'ortho', 'origin', [-20,-75], ...
'ParallelLabel', 'on', 'PLabelMeridian', -20) ;
Note that it would not make sense to display this information on the x and y axes. See, for example, parallels on your map: they describe curves in the x and y axes, so you can not take a given y and label it e.g. 30°S.

1 件のコメント

Anna
Anna 2013 年 8 月 4 日
Thanks for your help! These were the sort of commands I was looking for, just couldn't find them in matlab help before.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLabels and Annotations についてさらに検索

質問済み:

2013 年 8 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by