Why get(Box) returns an error?
2 views (last 30 days)
Show older comments
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 Comments
Image Analyst
on 22 Nov 2015
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.
Answers (2)
Walter Roberson
on 22 Nov 2015
"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 Comments
Image Analyst
on 22 Nov 2015
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?
0 Comments
See Also
Categories
Find more on Graphics Object Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!