All available default settings for groot?

조회 수: 85 (최근 30일)
lazymatlab
lazymatlab 2020년 6월 29일
답변: Steven Lord 2020년 6월 29일
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에서 Graphics Object Properties에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by