フィルターのクリア

All available default settings for groot?

61 ビュー (過去 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 Center および File ExchangeGraphics Object Properties についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by