Effacer les filtres
Effacer les filtres

Plotting a circle using geoplot

83 vues (au cours des 30 derniers jours)
Nur Zawani Rosli
Nur Zawani Rosli le 16 Avr 2023
Hello! I am having problem with plotting circle on a geoplot graph. Usually the circle would look nice and complete on the map.
However, I am plotting the circle at the end of the graph (near 180 deg E) which causes it to form this weird semi-circle that extends to the other side of the map to form a complete circle. How do I allow the plot to continue even after the end of the map?
Here's the result I keep getting and the code I'm using.
lat = -42.737;
lon = 173.054;
satlat = eq(:,2);
satlon = eq(:,3);
subplot(1,5,[4 5])
geolimits([-70 -10],[150 190])
hold on;
r = km2deg(db);
[latr,lonr] = scircle1(lat,lon,r);
hold on;
h = geoplot(latr,lonr,"LineWidth",2,...
t = h.Parent;
t.LatitudeLabel.String = "";
legend ('Dobrovolsky radius','SWARM B')
sgtitle('SWARM B - 13 Nov 2016 (05:23:33 - 05:39:40)')
Here's what it usually looks like and what I wanted.
Thank you :)

Réponse acceptée

Dave B
Dave B le 16 Avr 2023
Would wrapTo360 help here?
[latr,lonr] = scircle1(lat,lon,r);
title('result of scircle1')
title('result with wrapTo360')
  1 commentaire
Nur Zawani Rosli
Nur Zawani Rosli le 19 Avr 2023
Yes, thank you. It works! :)) Btw, I'm also having problem with the latitude, is there a way to standardize the latitude ratio? The star marker was supposed to be at the middle of the black line. But since the latitude stretches at latitude above 60 degree, the marker looks smaller and is not placed nicely at the middle. Is there a way to fix this? Thank you again!!

Connectez-vous pour commenter.

Plus de réponses (0)


En savoir plus sur Geographic Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by