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!