Comprehensive list of modifiers?
4 ビュー (過去 30 日間)
古いコメントを表示
Wondering if there is a list of modifiers for each function. Such as scatter(x,y,'MarkerSize','5')
Working with the toPPT tool and am looking at all the location modifiers for figures etc. I want to know if there is a list of all these modifiers for every function in MATLAB.
Thanks
1 件のコメント
Adam
2018 年 2 月 9 日
編集済み: Adam
2018 年 2 月 9 日
You can get a list for a given function (well, I obviously haven't tested it for all, but here with 'figure' for example) by doing something like
>> hFig = figure;
>> set( hFig )
Alphamap: {}
BusyAction: {'queue' 'cancel'}
ButtonDownFcn: {}
Children: {}
Clipping: {'on' 'off'}
CloseRequestFcn: {}
Color: {1×0 cell}
Colormap: {}
CreateFcn: {}
CurrentAxes: {}
CurrentCharacter: {}
CurrentObject: {}
CurrentPoint: {}
DeleteFcn: {}
DockControls: {'on' 'off'}
FileName: {}
GraphicsSmoothing: {'on' 'off'}
HandleVisibility: {'on' 'callback' 'off'}
InnerPosition: {}
IntegerHandle: {'on' 'off'}
Interruptible: {'on' 'off'}
InvertHardcopy: {'on' 'off'}
KeyPressFcn: {}
KeyReleaseFcn: {}
MenuBar: {'none' 'figure'}
Name: {}
NextPlot: {'new' 'add' 'replace' 'replacechildren'}
NumberTitle: {'on' 'off'}
OuterPosition: {}
PaperOrientation: {'portrait' 'landscape' 'rotated'}
PaperPosition: {}
PaperPositionMode: {'auto' 'manual'}
PaperSize: {}
PaperType: {1×26 cell}
PaperUnits: {'inches' 'centimeters' 'normalized' 'points'}
Parent: {}
Pointer: {1×17 cell}
PointerShapeCData: {}
PointerShapeHotSpot: {}
Position: {}
Renderer: {'painters' 'opengl'}
RendererMode: {'auto' 'manual'}
Resize: {'on' 'off'}
SelectionType: {'normal' 'open' 'extend' 'alt'}
SizeChangedFcn: {}
Tag: {}
ToolBar: {'none' 'auto' 'figure'}
UIContextMenu: {}
Units: {'inches' 'centimeters' 'characters' 'normalized' 'points' 'pixels'}
UserData: {}
Visible: {'on' 'off'}
WindowButtonDownFcn: {}
WindowButtonMotionFcn: {}
WindowButtonUpFcn: {}
WindowKeyPressFcn: {}
WindowKeyReleaseFcn: {}
WindowScrollWheelFcn: {}
WindowStyle: {'normal' 'modal' 'docked'}
採用された回答
Walter Roberson
2018 年 2 月 9 日
You have to either read the documentation or the source code for the applicable function.
Adam is correct that you can use set() to examine a list of object properties that can be set, but:
- set() only tells you about public properties, not about all properties that can be set if you know about them; and
- not all functions that create graphics object accept all name/value pairs applicable to the variety of graphics object that is created by the function.
I will give an example of what to look for in the documentation:
[...]
"contourf(...,Name,Value) specifies contour properties using one or more property name, property value pairs. Name is the property name and must appear inside single quotes (''). Value is the corresponding value. For example, 'LineWidth',2 sets the contour line width to 2. For a list of contour property names and values, see Contour Properties."
This should be interpreted as indicating that all of the properties documented at the link are supported in the contourf() call.
"imshow(_,Name,Value) displays an image, using name-value pairs to control aspects of the operation. "
Notice the lack of link to image() properties. So you have to go further down in the imshow documentation, https://www.mathworks.com/help/images/ref/imshow.html#bvmnrxj-5 to the "Name-Value Pair Arguments" list, and only the options listed there are supported. One of the more notable lacks there is that imshow() does not support the 'AlphaData' property that the underlying image objects have -- so if you want to use imshow() and you want to use 'AlphaData' then you have to record the output of imshow() and set() the AlphaData property of the returned object.
0 件のコメント
その他の回答 (2 件)
Star Strider
2018 年 2 月 9 日
There is.
At the end of the page, especially for graphics functions, a link to the object properties will be at the end of the page, usually under See Also.
0 件のコメント
Steven Lord
2018 年 2 月 9 日
If the function is part of a MathWorks product, the documentation for that function (if it is documented) is the most likely place such a list of recognized options will exist. For the scatter function you used as an example, type this command into MATLAB:
doc scatter
I recommend using your locally installed documentation instead of the online documentation if you're not using the latest release, as in that case the online documentation may describe options or functionality not available in your release because they are too new.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Lighting, Transparency, and Shading についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!