Why get(Box) returns an error?

The error is:
Error using box Too many output arguments.
Shouldn't it give me the children objects (not sure if this is the corect nomenclature) contained in it and their properties? For example, I know there's something called boxFrame that I want to customize. I was expecting to find it in the list resulting from get(box) but it doesn't seem to work. Second question: how do I know it exists?
Thanks

댓글 수: 6

Image Analyst
Image Analyst 2015년 11월 22일
MATLAB is case sensitive. Box and box are thus different functions. box() is a function. Why are you passing it into get()? And why are you calling box() with no arguments? Please paste the entire error message here - that means ALL the red text. Don't snip or paraphrase.
rbarata
rbarata 2015년 11월 22일
The error is:
_Error using box Too many output arguments._
Maybe I'm losing the focus of my question. The Axes box outline, is it an object?
Walter Roberson
Walter Roberson 2015년 11월 22일
편집: Walter Roberson 2015년 11월 22일
No, the Axes box outline is not an object, unless perhaps it is created as an object at the Java level.
rbarata
rbarata 2015년 11월 22일
I presume that Axes box is not an object also. I'm sorry for the confused questions, I'm new to this...the way I'm using to know which properties I can manipulate in an object is get(objectname). Is this ok or there's another way?
Image Analyst
Image Analyst 2015년 11월 22일
Again, exactly what are you trying to accomplish. Forget about your line of code and how you're trying to go about it - just let us know what you want to do and we'll tell you the best way to accomplish it.
rbarata
rbarata 2015년 11월 22일
Thanks for your time and patience.
Ok, using a concrete example...a 3D plot. I want to know how to make visible the box outline in all corners of the box.

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

답변 (2개)

Walter Roberson
Walter Roberson 2015년 11월 22일

0 개 추천

"box on displays the box outline around the current axes. This option sets the Box property of the current axes to 'on'."
Notice that box does not return a "box", only sets a property of the axes that determines how the axes is drawn.
You can use
get(gca, 'Box')
to examine the property.
Please post a link to some information about boxFrame as I do not see any evidence that such a thing exists in MATLAB. The closest that I can find is that SimMechanics has "Box Frame Trees".

댓글 수: 2

rbarata
rbarata 2015년 11월 22일
Here it is:
Walter Roberson
Walter Roberson 2015년 11월 22일
Ah, that is part of R2014b and later, which I do not have access to.

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

Image Analyst
Image Analyst 2015년 11월 22일

0 개 추천

When I said " Please paste the entire error message here - that means ALL the red text. Don't snip or paraphrase." you did exactly what I said not to do. How do I know? Because there are no line numbers or other things that tell me you copied and pasted ALL the red text.
Anyway, box() is a function that does not return anything. So why on earth are you passing that to get()???? Get() expects a handle to an object, like a GUI control, not a null. What are you trying to do anyway?

카테고리

도움말 센터File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

질문:

2015년 11월 21일

댓글:

2015년 11월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by