Borrar filtros
Borrar filtros

Make colored circle in polar plot

8 visualizaciones (últimos 30 días)
JZ
JZ el 8 de Jul. de 2021
Comentada: Image Analyst el 12 de Jul. de 2021
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.

Respuestas (1)

Image Analyst
Image Analyst el 8 de Jul. de 2021
Maybe you can adapt the attached demo.
  2 comentarios
JZ
JZ el 12 de Jul. de 2021
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!
Image Analyst
Image Analyst el 12 de Jul. de 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);

Iniciar sesión para comentar.

Categorías

Más información sobre Scatter Plots en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by