Info

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

Does axes() return anything?

조회 수: 1 (최근 30일)
Minh Tran
Minh Tran 2015년 9월 6일
마감: MATLAB Answer Bot 2021년 8월 20일
f2 = figure;
a1 = axes('Parent',f2);
What is a1?
  댓글 수: 1
Stephen23
Stephen23 2015년 9월 7일

답변 (2개)

Star Strider
Star Strider 2015년 9월 6일
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 2015년 9월 6일
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
Walter Roberson
Walter Roberson 2015년 9월 6일
Probably not. axes('Parent', f2) is the proper syntax for creating a new axes whose parent is f2 .

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by