How to plot a polar plot with different colors or how to overlay the plots?
4 次查看(过去 30 天)
显示 更早的评论
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. :)
0 个评论
回答(1 个)
Star Strider
2021-4-2
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
.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Polar Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!