How to plot a polar plot with different colors or how to overlay the plots?

4 visualizaciones (últimos 30 días)
I have to have different colour for negative values and another one for positive values on the polar plot. The second option is to overlay two plots: one with negative and the other with positive values. My data is read from excel. I am adding a photo of a plot "Okres 3" to help you to see what it looks like. I would really apreciate your help. :)

Respuestas (1)

Star Strider
Star Strider el 2 de Abr. de 2021
Try something like this:
a = linspace(0, 2*pi); % Create Data
r = sin(a) + cos(2*a); % Create Data
ispos = r>0; % Positive ‘r’ Values = ‘true’
figure
polarplot(a(ispos), r(ispos), '-r')
hold on
polarplot(a(~ispos), r(~ispos), '-g')
hold off
.

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by