All available default settings for groot?

60 次查看(过去 30 天)
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

采纳的回答

Steven Lord
Steven Lord 2020-6-29
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.)

更多回答(1 个)

Image Analyst
Image Analyst 2020-6-29
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 个评论
lazymatlab
lazymatlab 2020-6-29
编辑:lazymatlab 2020-6-29
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, ...).

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Animation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by