Hi,
when plotting antenna radiation patterns like in this example below, it always plots x,y,z axis and three ellipses. I do not want to see any ellipses and the axis colors should be black only. Is there also a way to hide the left box on the bottom containing the antenna symbol and also the information box on the left upper corner?
Thank you very much!
ant = helix;
pattern(ant,2e9)

 채택된 답변

Voss
Voss 2023년 10월 28일
Here's one way to do some of that:
ant = helix;
pattern(ant,2e9)
f = gcf();
ax = findall(f,'Type','Axes','Tag','patternAxis');
p = findall(ax,'Type','patch');
h = findall(ax,'Type','line');
t = findall(ax,'Type','text');
set([p;h;t],'Visible','off')
ax = findall(f,'Type','Axes','Tag','geometryInPattern');
set([ax; allchild(ax)],'Visible','off')
uic = findall(f,'Type','uicontrol');
set(uic,'Visible','off');
bnd = findall(f,'Tag','boundarydotted');
set(bnd,'Visible','off');
I'm not sure what you mean by "the axis colors should be black only". Can you explain that part?

댓글 수: 4

Dingodongo
Dingodongo 2023년 10월 28일
편집: Dingodongo 2023년 10월 28일
wow this is really impressive, thank you.
What I meant was that I still want to see the axis x,y,z (and the text, ev and az can also stay) in black color and not different colors for each axis.
This command effectively deletes the ellipses, so I only need the code for changing the color of h(1,1) to h(3,1)
set([h(6,1),h(7,1),h(8,1)],'Visible','off')
Dingodongo
Dingodongo 2023년 10월 28일
and this does the trick:
set([h(1,1)],'Color',[0,0,0])
thank you again, my question is now answered
ant = helix;
pattern(ant,2e9)
f = gcf();
ax = findall(f,'Type','Axes','Tag','patternAxis');
h = findall(ax,'Type','line');
set(h([6 7 8]),'Visible','off')
set(h([1 2 3]),'Color','k')
ax = findall(f,'Type','Axes','Tag','geometryInPattern');
set([ax; allchild(ax)],'Visible','off')
uic = findall(f,'Type','uicontrol');
set(uic,'Visible','off');
bnd = findall(f,'Tag','boundarydotted');
set(bnd,'Visible','off');
Voss
Voss 2023년 10월 28일
You're welcome!

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Antennas and Electromagnetic Propagation에 대해 자세히 알아보기

제품

릴리스

R2023b

질문:

2023년 10월 28일

댓글:

2023년 10월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by