Filter löschen
Filter löschen

Colormap and radar plot

7 Ansichten (letzte 30 Tage)
Braden
Braden am 1 Jun. 2011
I am trying to build a plot like this: http://www.windographer.com/media/medialibrary/2010/04/windshear.png I haven't quite got it to work with. I would like to use the colormap to cycle through line colors, but the 'polar' plot gives an error. I have 24 columns I would like to plot (24 different lines on the radar plot), so I am using 24 different colors from the colormap. The following code works to build a normal plot:
cc = hsv(24)
figure
for i = 2:25
p=i-1;
plot(data(:,26),data(:,i),'color',cc(p,:));
hold on;
set(gca,'view',[90 -90])
title('Power Law Exponent by Hour')
end
but when I replace 'plot' with 'polar', it gives this error: Error using ==> polar at 23 Too many input arguments. Is there any way around this?
  1 Kommentar
Braden
Braden am 1 Jun. 2011
So I figured out how to do this using:
L(p) = polar(data(:,26),data(:,i));
hold on
set(L(p),'color',cc(p,:),'LineWidth',2)
If anyone could tip me on how to create the empty space in the middle of the radar plot I would greatly appreciate it!

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Walter Roberson
Walter Roberson am 1 Jun. 2011
polar() does not allow one to configure any space in the middle like that. The closest it comes is that you could increase your radii by a fixed value to leave a gap from the center, and then you could set() the String attribute of the text() objects that polar uses for the radii labels to relabel them to the unadjusted value.
polar() does not provide very many user-configurable options at all. Probably there is a more configurable equivalent in the MATLAB File Exchange, but I am haven't searched to be sure.

Kategorien

Mehr zu Polar Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by