Main Content

groot

Graphics root object

Description

groot refers to the graphics root object. Use groot to access root properties. For a list of properties, see Root Properties.

example

r = groot stores the graphics root object handle. To set root properties using dot notation, you must store the handle first.

example

Examples

collapse all

View a list of graphics root properties and their current values.

get(groot)
         CallbackObject: [0x0 GraphicsPlaceholder]
               Children: [0x0 GraphicsPlaceholder]
          CurrentFigure: [0x0 GraphicsPlaceholder]
     FixedWidthFontName: 'Courier New'
       HandleVisibility: 'on'
       MonitorPositions: [1 1 1280 1024]
                 Parent: [0x0 GraphicsPlaceholder]
        PointerLocation: [1 1]
            ScreenDepth: 24
    ScreenPixelsPerInch: 100
             ScreenSize: [1 1 1280 1024]
      ShowHiddenHandles: off
                    Tag: ''
                   Type: 'root'
                  Units: 'pixels'
               UserData: []

Set graphics root property values by storing the object handle and using dot notation.

r = groot;
r.ShowHiddenHandles = 'on';

Tips

  • Use the graphics root object to set default values on the root level for other types of objects. For example, set the default colormap for all future figures to the summer colormap.

    set(groot,'DefaultFigureColormap',summer)
    To restore a property to its original MATLAB® default, use the 'remove' keyword.
    set(groot,'DefaultFigureColormap','remove')
    For more information on setting default values, see Default Property Values.

Version History

Introduced in R2014b

See Also

Functions

Properties