MATLAB: I did not find in the documentation. What is the meaning of set(0,….). What does 0 signify

MATLABset get

I did not find in the documentation. What is the meaning of set(0,….). What does 0 signify? I know that it is the handle? Is the first handle always 0? What does this mean?

Best Answer

The 0 refers to the "root", from where all graphics properties are inherited when a figure is created. By changing the values in the root, all graphics objects that are created will inherit that property, unless otherwise specified, eg:
set(0,'DefaultAxesLineStyleOrder',{'-o',':s','--+'})
The documentation of R2010b states:
The root is a graphics object that corresponds to the computer screen. There is only one root object and it has no parent. The children of the root object are figures.
The root object exists when you start MATLAB; you never have to create it and you cannot destroy it. Use set and get to access the root properties.
On more recent version of MATLAB, the 0 has been replaced by groot .