필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How can I call the properties of figure with more than 1 graph in it?

조회 수: 1 (최근 30일)
Mohammad
Mohammad 2014년 1월 31일
마감: MATLAB Answer Bot 2021년 8월 20일
I have a figure that has more than 1 graphs in it. How can I change the lineStyle of each one?

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2014년 1월 31일
t=0:0.1:10;
y1=sin(t)
y2=cos(t)
h=plot(t,y1,t,y2)
set(h(1),'linewidth',12)
% h(1) and h(2) are handles of plot 1 and plot 2
  댓글 수: 2
Mohammad
Mohammad 2014년 1월 31일
Thank you, but I'm not the one drawing the graphs, The user enters a .fig file...
Azzi Abdelmalek
Azzi Abdelmalek 2014년 1월 31일
You can get the handles h by
h=get(gca,'children')

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by