Effacer les filtres
Effacer les filtres

removing values, connect lines and change thickness of border in a polar plot

3 vues (au cours des 30 derniers jours)
HYZ
HYZ le 25 Août 2022
Commenté : Chunru le 25 Août 2022
Hi,
I used polarplot function.
(i) I would like to remove the rho values suchas 0, 100, 200, 300.
(ii) I also want to draw a dotted line connecting 0 and 180.
(iii) How to make the border of polar plot thicker.
thanks a lot in advance.

Réponse acceptée

Chunru
Chunru le 25 Août 2022
Modifié(e) : Chunru le 25 Août 2022
theta = 0:.01:2*pi;
rho = sin(2*theta).*cos(2*theta);
polarplot(theta, rho);
h = gca;
h.RTickLabel = []; % remove rho values
%ii) I also want to draw a dotted line connecting 0 and 180.
rl = rlim; hold on
polarplot([0 pi], rl(2)*[1 1], 'g--'); %or :
polarplot([3*pi/2 pi/2], rl(2)*[1 1], 'g--');
%(iii) make the border thicker
polarplot(linspace(0, 2*pi, 61), rl(2)*ones(61,1), 'k-', 'LineWidth', 2)
  4 commentaires
HYZ
HYZ le 25 Août 2022
rl = rlim; hold on
polarplot([0 pi], rl(2)*[1 1], 'g--');
polarplot([3*pi/2 pi/2], rl(2)*[1 1], 'g--');
can I do if I also want another dotted line connecting 90 and 270?
Thanks a lot!
Chunru
Chunru le 25 Août 2022
Yes. Why not? See above.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

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

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by