How to add geoplot minor tick marks to map

3 ビュー (過去 30 日間)
Deborah Johnson
Deborah Johnson 2022 年 7 月 22 日
コメント済み: Deborah Johnson 2022 年 7 月 26 日
Hello,
I know how to add minor ticks to x/y axis but with geoplot it is different.
My major ticks are every degree, so, how do I add the minor ticks inbetween? I have attached my map with code.
  3 件のコメント
Deborah Johnson
Deborah Johnson 2022 年 7 月 25 日
編集済み: Deborah Johnson 2022 年 7 月 25 日
That's what I thought but needed confirmation. Thank you.
I found a possible solution. It's under figure/tools/view grid and snap to grid. I'll have to research the other options under it. What are your thoughts?
Deborah Johnson
Deborah Johnson 2022 年 7 月 26 日
Hello Star, below is the code that I re-work. Is there anyway to improve on it?

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

採用された回答

Deborah Johnson
Deborah Johnson 2022 年 7 月 26 日
Is there any way I can improve on the tick marks?
mapping = readtable("Book1.csv");
lat = mapping.Latitude; % convert radians to degrees here >>...
% by multiplying 57.2958
lon = mapping.Longitude; % convert radians to degrees >>...
% by multiplying 57.2958
%gx = gca % Get handle to current axes.
geoplot(lat, lon, '-r', 'LineWidth', 2)
gx.TickLabelFormat = '-dd';
geolimits([34.0 35.4],[-85.7 -82.9]);
gx.LatitudeAxis.TickValues=[33.6: 0.2:35.6];
gx.LongitudeAxis.TickValues=[-85.7:0.2:-82.9];
grid on;
gx.GridAlpha = 0.9; % Make grid lines less transparent.
Open attachment to view map.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeographic Plots についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by