Make colored circle in polar plot

Hi there, I need to make colored circle (with different values) in polar plot, looks like below. May anyone help me out? Thanks in advance.

답변 (1개)

Image Analyst
Image Analyst 2021년 7월 8일

0 개 추천

Maybe you can adapt the attached demo.

댓글 수: 2

JZ
JZ 2021년 7월 12일
This is quite neat. Really appreciate that.
I am now thinking of make it simpler. But I prefer to set those color circles w/ different red or blue scaled by different values. Would you please help me out? Thanks!
I'd probably use scatter() where you can specify the color of each data point.
numSpots = 50; % Whatever you want.
markerSize = 100; % Whatever you want.
radius = 10; % Whatever you want.
angles = linspace(20, 270, numSpots); % Whatever starting and stopping angles you want.
x = radius * cosd(angles);
y = radius * sind(angles);
% Make up some colors for the data points,
% like one that follows the jet colormap for example.
spotColors = jet(length(x));
% Plot dots in a scatter plot.
scatter(x, y, markerSize, spotColors, 'filled');
grid on;
xlabel('x', 'FontSize', 15);
ylabel('y', 'FontSize', 15);

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Polar Plots에 대해 자세히 알아보기

제품

릴리스

R2017a

태그

질문:

JZ
2021년 7월 8일

댓글:

2021년 7월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by