![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/677438/image.png)
Make colored circle in polar plot
9 次查看(过去 30 天)
显示 更早的评论
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/677418/image.png)
0 个评论
回答(1 个)
Image Analyst
2021-7-8
Maybe you can adapt the attached demo.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/677438/image.png)
2 个评论
Image Analyst
2021-7-12
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);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/682418/image.png)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Scatter Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!