Editing existing figure properties

37 visualizzazioni (ultimi 30 giorni)
Osiris Terry
Osiris Terry il 8 Set 2020
Risposto: Star Strider il 8 Set 2020
hf = openfig('fig.fig');
ha = hf.Children(end);
How do I edit the properties (linewidth and axis labels) of hf?
  1 Commento
OMKARAM RAJESHWARA RAJU
OMKARAM RAJESHWARA RAJU il 8 Set 2020
Modificato: OMKARAM RAJESHWARA RAJU il 8 Set 2020
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..!

Accedi per commentare.

Risposte (1)

Star Strider
Star Strider il 8 Set 2020
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;.
.

Categorie

Scopri di più su Graphics Object Properties in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by