All available default settings for groot?

80 visualizaciones (últimos 30 días)
lazymatlab
lazymatlab el 29 de Jun. de 2020
Respondida: Steven Lord el 29 de Jun. de 2020
Hello,
Today I've found that I can change the default order of line colors and line styles of multi-line plot using
set(groot, 'DefaultAxesColorOrder', newcolors)
set(groot, 'DefaultAxesLineStyleOrder', '-|:|.-')
% https://kr.mathworks.com/matlabcentral/answers/20187-how-to-change-the-standard-of-coloring-figures
So I digged a little bit further, and found I can also set stuff like
set(groot, 'defaultLineLineWidth', 2)
set(groot, 'defaultFigureColor', 'b')
% https://kr.mathworks.com/help/matlab/creating_plots/default-property-values.html
set(groot, 'DefaultFigureColormap', hot)
% https://kr.mathworks.com/help/matlab/ref/groot.html
set(groot, 'Units', 'normalized')
% https://kr.mathworks.com/help/matlab/ref/matlab.ui.root-properties.html
Is there any reference page that lists all available default settings for groot? I don't understand why those default settings are separated in several pages. I could not even find 'DefaultAxesColorOrder' except the answers page above.
Thank you.
Kang

Respuesta aceptada

Steven Lord
Steven Lord el 29 de Jun. de 2020
Those "properties" aren't properties of groot. See this documentation page for a description of that syntax for setting default property values for other Handle Graphics objects that will be created under groot in the future. Note that you can set the defaults at a more granular level too, setting the default for all Axes created in a figure without affecting Axes created in another figure as an example.
At least theoretically you can set the default property value for any settable property of a Handle Graphics this way. [I'm not aware of any exceptions.] Some may be more useful than others (setting the 'DefaultLineXData' at best won't do anything, and at worst could cause your attempt to create a line to issue a warning and not draw the line.)

Más respuestas (1)

Image Analyst
Image Analyst el 29 de Jun. de 2020
Type groot on the command line:
>> groot
ans =
Graphics Root with properties:
CurrentFigure: [0×0 GraphicsPlaceholder]
ScreenPixelsPerInch: 96
ScreenSize: [1 1 1920 1080]
MonitorPositions: [1 1 1920 1080]
Units: 'pixels'
Show all properties
CallbackObject: [0×0 GraphicsPlaceholder]
Children: [0×0 GraphicsPlaceholder]
CurrentFigure: [0×0 GraphicsPlaceholder]
FixedWidthFontName: 'Courier New'
HandleVisibility: 'on'
MonitorPositions: [1 1 1920 1080]
Parent: [0×0 GraphicsPlaceholder]
PointerLocation: [545 93]
ScreenDepth: 32
ScreenPixelsPerInch: 96
ScreenSize: [1 1 1920 1080]
ShowHiddenHandles: off
Tag: ''
Type: 'root'
Units: 'pixels'
UserData: []
  1 comentario
lazymatlab
lazymatlab el 29 de Jun. de 2020
Editada: lazymatlab el 29 de Jun. de 2020
Thank you for your answer. But I can't find some stuff like 'defaultAxesColorOrder' or 'defaultFigureColormap' from this list, even though they are available to be set using set(groot, ...).

Iniciar sesión para comentar.

Categorías

Más información sobre Graphics Object Properties en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by