Getting all properties (including hidden ones) from 0 (Root object)

It seems that the aka 0 root object has hidden properties in Matlab. For example, DefaultTextInterpreter is one of them:

  x = get(0,'DefaultTextInterpreter'); 

When i use

  get(0) 

I get a long list that does not include DefaultTextInterpreter .


Even setting undocumented properties will be visible

  set(0,'HideUndocumented','off'); 

doesn't seem to help.


How can I find all the properties of the root object, including DefaultTextInterpreter ?

+7
source share
2 answers

The default properties are not hidden and undocumented - they are available for all standard Handle Graphics properties, just the "Default" prefix for the property name along with the type of the object ("Line", "Axes", etc.). This is explained in the official documentation .

In fact, this mechanism also works for hidden / undocumented properties, as shown for the LineSmoothing property.

To view all supported default properties, do the following:

 >> get(0,'Default') ans = defaultFigurePosition: [440 378 560 420] defaultTextColor: [0 0 0] defaultAxesXColor: [0 0 0] defaultAxesYColor: [0 0 0] defaultAxesZColor: [0 0 0] defaultPatchFaceColor: [0 0 0] defaultPatchEdgeColor: [0 0 0] defaultLineColor: [0 0 0] defaultFigureInvertHardcopy: 'on' defaultFigureColor: [0.8 0.8 0.8] defaultAxesColor: [1 1 1] defaultAxesColorOrder: [7x3 double] defaultFigureColormap: [64x3 double] defaultSurfaceEdgeColor: [0 0 0] defaultFigurePaperType: 'A4' defaultFigurePaperUnits: 'centimeters' defaultFigurePaperSize: [20.98404194812 29.67743169791] 

Note that this does not return undocumented defaults. You can always get undocumented defaults:

 >> get(0,'DefaultLineLineSmoothing') ans = off 

<h / "> Since I can’t help myself :-), a little now is really undocumented knowledge that does not answer the question of the OP, but it is somehow connected. Readers who are interested only in the initial question or in documented materials, can safely skip this part:

 >> p = findprop(handle(gcf),'pos') p = schema.prop >> p.get Name: 'Position' Description: '' DataType: 'figurePositionType' FactoryValue: [100 100 660 520] AccessFlags: [1x1 struct] Visible: 'on' GetFunction: [] SetFunction: [] 

In this simple snippet, note that the default value (FactoryValue) for the position property of the hg.Figure UDD class is different from the default HG value, which is returned by the root property DefaultFigurePosition. More information about the properties of UDD can be found here .

Adding 2013-02-13 . I just posted a detailed article explaining how Matlab Default and Factory property values ​​work, how they relate to each other, and how to get them.

+9
source

0 - call the root object . ( Setting default property values )

This is not a complete answer to the question. I just want to draw your attention to a couple of articles on UndocumentedMatlab.com :

He has a link to great utility from Yair Altman - getundoc . However, it also does not show default properties.

I believe @Yair_Altman is the one who should answer this question.

+2
source

All Articles