Editing existing figure properties

hf = openfig('fig.fig');
ha = hf.Children(end);
How do I edit the properties (linewidth and axis labels) of hf?

댓글 수: 1

OMKARAM RAJESHWARA RAJU
OMKARAM RAJESHWARA RAJU 2020년 9월 8일
편집: OMKARAM RAJESHWARA RAJU 2020년 9월 8일
hello Osiris,
you can directly access all the properties of plot by using dot notation
Ex: hf.LineWidth = 2;
hf.MarkerIndices = 1:3: 100;
hf.axis = [ 2 4 6 8];
click this link for all the properties of plot:
please also check for different Line properties available.
hope i answered your question..!

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

답변 (1개)

Star Strider
Star Strider 2020년 9월 8일

0 개 추천

This has changed over time, specifically in R2014b.
In R2020a, this works:
Ax = findobj(hf, 'Type','Axes');
Lines = findobj(Ax, 'Type','Line');
XL = Ax.XLabel;
YL = Ax.YLabel;
LW = Lines.LineWidth;.
.

카테고리

도움말 센터File Exchange에서 Graphics Object Properties에 대해 자세히 알아보기

질문:

2020년 9월 8일

답변:

2020년 9월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by