Matlab Polar Plot Legend does not match with the plot

조회 수: 8 (최근 30일)
Yule Huang
Yule Huang 2021년 9월 20일
답변: Star Strider 2021년 9월 20일
When I plot 3 data sets in polar polt, and I try to use legend to identitfy the difference. But the legend does not matcht the plot.

답변 (1개)

Star Strider
Star Strider 2021년 9월 20일
I cannot run that and I amm not certain what you are are plotting. Create a handle for each polarplot call:
th = linspace(0, 2*pi);
figure
hpp1 = polarplot(th, ones(3,100), '-r');
hold on
hpp2 = polarplot(th, ones(3,100)*0.7, '--b');
hpp3 = polarplot(th, ones(3,100)*0.2, '.-k');
hold off
legend([hpp1(1),hpp2(1),hpp3(1)], 'r','b','k')
Experiment with your code.
.

카테고리

Help CenterFile Exchange에서 Polar Plots에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by