I want to Plot Polar plot of two data on same figure with different line styles each time i run the code below, it only bring out same line style, please can anyone help in debugging this?
%% Plot a- MEASURED and SIMULATED E- plane radiation characteristics at 4.02GHz
figure()
P = polarpattern(MEASURED402data(:,2),'TitleBottom','(a) F=4.02 GHz', 'AngleDirection','cw',...
'AngleAtTop',0,'AngleResolution',30, 'MagnitudeLim' ,[-40 2],'ConnectEndpoints',[1],'ColorOrder',co);
hold on
P = polarpattern(SIMULATED402data(:,2),'--');
hold off
legend('E-PLANE MEASURED', 'E - PLANE SIMULATED')

 채택된 답변

Dyuman Joshi
Dyuman Joshi 2023년 9월 12일

0 개 추천

It seems that plotting multiple plots with polarpattern retaining existing plots changes the line-style of the plots to the latest plot.
I do not know why this happens (yet).
az = [0:360];
figure
p=polarpattern(abs(cosd(az)),'LineStyle', '-')
p =
polari with properties: AngleData: [361×1 double] MagnitudeData: [361×1 double] Show all properties, methods
hold on
q=polarpattern(abs(sind(az)),'LineStyle','--')
q =
polari with properties: AngleData: {[361×1 double] [361×1 double]} MagnitudeData: {[361×1 double] [361×1 double]} Show all properties, methods
A work around to change the line style of an individual plot would be to hover over a plot in the generated figure, right click on it, and change the line style manually.
The curve will be highlighted when you hover it and Line style is the 1st option on the menu that opens after the right click.

댓글 수: 2

Elijah Joseph
Elijah Joseph 2023년 9월 12일
Thank you so much for the great help Dyuman.
Dyuman Joshi
Dyuman Joshi 2023년 9월 12일
You are welcome!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Polar Plots에 대해 자세히 알아보기

태그

질문:

2023년 9월 12일

댓글:

2023년 9월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by