필터 지우기
필터 지우기

how to plot a circle in MATLAB with inner concentric circles?

조회 수: 6 (최근 30일)
Jamie Al
Jamie Al 2022년 7월 20일
답변: Star Strider 2022년 7월 20일
How can I create this following plot, the black circle showing the Northern polar view with the magnetic local times (MLT) and concentric dashed circles are plotted in 10° interval, with the outermost ring representing 40°.??
  댓글 수: 2
Michael
Michael 2022년 7월 20일
You just want the polar grid?
Jamie Al
Jamie Al 2022년 7월 20일
Yes! and I will add my own data to it.

댓글을 달려면 로그인하십시오.

채택된 답변

Star Strider
Star Strider 2022년 7월 20일
Try something like this —
rv = linspace(80, 40, 5);
r = linspace(0, 5, 6);
ac = linspace(0, 2*pi, 500);
xc = r(:)*cos(ac);
yc = r(:)*sin(ac);
al = linspace(0, 2*pi, 5);
xl = max(r)*cos(al);
yl = max(r)*sin(al);
figure
plot(xc.', yc.', '-k')
hold on
plot([-1 1]*max(r), [0 0], '-k')
plot([0 0], [-1 1]*max(r), '-k')
hold off
Ax = gca;
axis('equal')
Ax.Visible = 'off';
text(r(2:end), zeros(size(r(2:end))), compose('%2d',rv), 'Vert','top', 'Horiz','right') % Degrees Latitude
ha = ["left" "center" "right" "center"];
va = ["middle" "bottom" "middle" "top"];
lt = 6:6:24;
for k = 1:4
text(xl(k), yl(k), sprintf('%2d LT',lt(k)), 'Horiz',ha(k), 'Vert',va(k)) % Time Labels
end
% text(-6,4,sprintf('|_____|\n2000 ms'), 'Interpreter','latex') % Scale Bar
Experiment to get the result you want. The scale bar prints, however MATLAB doesn’t like it, so I commented it out.
.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Grid Lines, Tick Values, and Labels에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by