Colormap and radar plot

10 次查看(过去 30 天)
Braden
Braden 2011-6-1
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 个评论
Braden
Braden 2011-6-1
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!

请先登录,再进行评论。

回答(1 个)

Walter Roberson
Walter Roberson 2011-6-1
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.

类别

Help CenterFile Exchange 中查找有关 Colormaps 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by