Plotting a circle using geoplot
조회 수: 50 (최근 30일)
이전 댓글 표시
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])
geoplot(lat,lon,"-p",'MarkerFaceColor',"b",...
'MarkerSize',15)
geolimits([-70 -10],[150 190])
hold on;
geoplot(satlat,satlon,"-","LineWidth",2,...
"Color","k")
r = km2deg(db);
[latr,lonr] = scircle1(lat,lon,r);
hold on;
h = geoplot(latr,lonr,"LineWidth",2,...
"Color","b");
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 :)
댓글 수: 0
채택된 답변
Dave B
2023년 4월 16일
lat=-42;
lon=173;
r=20;
[latr,lonr] = scircle1(lat,lon,r);
nexttile
geoplot(latr,lonr,'LineWidth',3)
title('result of scircle1')
nexttile
geoplot(latr,wrapTo360(lonr),'LineWidth',3)
title('result with wrapTo360')
추가 답변 (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!