Colormap and radar plot

8 ビュー (過去 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 Center および File ExchangeColormaps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by