필터 지우기
필터 지우기

Colormap and radar plot

조회 수: 7 (최근 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에서 Polar Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by