how to plot a circle in MATLAB with inner concentric circles?
2 次查看(过去 30 天)
显示 更早的评论
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°.??
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Axes Appearance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!