Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Does axes() return anything?

1 visualizzazione (ultimi 30 giorni)
Minh Tran
Minh Tran il 6 Set 2015
Chiuso: MATLAB Answer Bot il 20 Ago 2021
f2 = figure;
a1 = axes('Parent',f2);
What is a1?

Risposte (2)

Star Strider
Star Strider il 6 Set 2015
The ‘a1’ variable is a ‘handle’ to the axes object.
In (I hope) more understandable terms, it shows all the properties of the axes of ‘f2’. This is useful if you want to find out what they are, and more usefully, to change them after the figure was plotted. This is particularly important if you want to change the tick positions, tick labels, or other characteristics of the axes object.
To see all the properties, add this line after the ‘a’ assignment:
a1_detail = get(a1)

the cyclist
the cyclist il 6 Set 2015
Pure speculation here. Were you actually intending to return the parent object of f2? In that case you want
get(f2,'Parent')
or
f2.Parent
  1 Commento
Walter Roberson
Walter Roberson il 6 Set 2015
Probably not. axes('Parent', f2) is the proper syntax for creating a new axes whose parent is f2 .

Questa domanda è chiusa.

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by