How to label the longitudinal axis with positive and negative values ?
5 次查看(过去 30 天)
显示 更早的评论
Hi,
I have plot the part of world map from lattitude region [30 deg, -30d eg] and longitude region [130deg , -130 deg]
In my plot the lattitude region is fine but I want to modify the lables on the longitude regions. On the right side of the 180deg I wan to lable as - 170, - 160, -150 , -140, and -130 deg. While on the left side of 180deg I want the x axis display +170, +160, +150 , +140, and +130. Also any suggestion how I can remove the scale displayed as 2000 km and 1000 mi.
Im new to matlab and any suggetons will be kindly appreciated.Thanking in advance.
Im attaching my codes and the graph.
load coastlines
geoplot(coastlat,coastlon,"b", 'LineWidth' ,1)
geobasemap topographi
geolimits([-30 30],[130 -130])
box on
ax = gca;
ax.LineWidth = 2;
0 个评论
采纳的回答
Chunru
2022-9-11
load coastlines
geoplot(coastlat,coastlon,"b", 'LineWidth' ,1)
geobasemap topographi
geolimits([-30 30],[130 -130])
box on
ax = gca;
ax.LineWidth = 2;
ax.LongitudeAxis.TickLabels = string(wrapTo180(ax.LongitudeAxis.TickValues))+"^\circ";
ax.TickLabelFormat = "-dms";
ax.Scalebar.Visible = "off";
更多回答(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!