Skip to content

groot

plot · scripts/plot/util/groot.m

: h = groot ()

Handle of the root graphics object.

Every figure, and through it every other graphics object, descends from the root. Its properties describe the graphics system as a whole, for example ScreenSize; get (groot) lists them.

Properties whose names start with "Default" set the defaults for all objects of a given type. To make every text object use a particular font:

set (groot, "DefaultTextFontName", "DejaVu Sans")

Assigning the value "remove" deletes such a default again:

set (groot, "DefaultTextFontName", "remove")

The root currently has the handle value 0. Code that calls groot instead of writing 0 will keep working should that value ever change.