Make colored circle in polar plot
14 views (last 30 days)
Show older comments
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.
0 Comments
Answers (1)
Image Analyst
on 8 Jul 2021
Maybe you can adapt the attached demo.
2 Comments
Image Analyst
on 12 Jul 2021
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);
See Also
Categories
Find more on Scatter Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!