change width and color of a compass plot

27 views (last 30 days)
I have a compass plot (attached) and I want to cnage the line width, color, and type using code not manually. Any help would be greatly appreciated.

Accepted Answer

Ismaeel on 11 Apr 2019
Thaks Adam, but I use compass function not polarplot.
Anyway, I found my solution in:
using the following code:
Z = compass(eig(randn(5)));
colors = get(0,'DefaultAxesColorOrder')
for i=1:length(Z)
  1 Comment
Adam Danz
Adam Danz on 11 Apr 2019
Edited: Adam Danz on 11 Apr 2019
It doesn't really matter which plotting function you're using (in most cases). The solution is the same as my answer.

Sign in to comment.

More Answers (1)

Adam Danz
Adam Danz on 11 Apr 2019
Use the handle output from the plotting function.
h = polarplot(theta,rho);
h.LineWidth = 3;
h.Color = 'r';


Find more on Polar Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by