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
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
2020-9-8
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 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!