Borrar filtros
Borrar filtros

How to label the longitudinal axis with positive and negative values ?

6 visualizaciones (últimos 30 días)
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;

Respuesta aceptada

Chunru
Chunru el 11 de Sept. de 2022
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";

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by