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

2 vues (au cours des 30 derniers jours)
Jamie Al
Jamie Al le 20 Juil 2022
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 commentaires
Michael
Michael le 20 Juil 2022
You just want the polar grid?
Jamie Al
Jamie Al le 20 Juil 2022
Yes! and I will add my own data to it.

Connectez-vous pour commenter.

Réponse acceptée

Star Strider
Star Strider le 20 Juil 2022
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.
.

Plus de réponses (0)

Catégories

En savoir plus sur Axes Appearance 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