plot templates and options lists for set, plot etc.

Ben Abbott bpabbott at mac.com
Sun Jun 7 08:01:07 CDT 2009


On Jun 7, 2009, at 8:46 AM, John W. Eaton wrote:

> On  6-Jun-2009, Thorsten Meyer wrote:
>
> | Also, how are graphic objects realized internally? Aren't they also
> | structures? It always seemed quite strange to me, that the get()
> | function returns a structure, while all the functions setting handle
> | options take lists of key, value,... as input arguments...
>
> I think Matlab just prints the properties and does not return a
> structure.
>
> When the graphics property classes were written, it seemed easier to
> simply return the internal data as a structure instead of writing
> special code to print it.
>
> jwe

Matlab returns a structure for both p=get(h) and p=set(h). If  
nargout==0 then lists are printed.

The set(h) functionality can be useful in that is displays the default  
values for each properties (where defaults exist).

 >> set (0)
	CurrentFigure
	Diary: [ on | off ]
	DiaryFile
	Echo: [ on | off ]
	FixedWidthFontName
	Format: [ short | long | shortE | longE | shortG | longG | hex | bank  
| + | rational | debug | shortEng | longEng ]
	FormatSpacing: [ loose | compact ]
	Language
	More: [ on | off ]
	PointerLocation
	RecursionLimit
	ScreenDepth
	ScreenPixelsPerInch
	ShowHiddenHandles: [ on | {off} ]
	Units: [ inches | centimeters | normalized | points | pixels |  
characters ]

	ButtonDownFcn: string -or- function handle -or- cell array
	Children
	Clipping: [ {on} | off ]
	CreateFcn: string -or- function handle -or- cell array
	DeleteFcn: string -or- function handle -or- cell array
	BusyAction: [ {queue} | cancel ]
	HandleVisibility: [ {on} | callback | off ]
	HitTest: [ {on} | off ]
	Interruptible: [ {on} | off ]
	Parent
	Selected: [ on | off ]
	SelectionHighlight: [ {on} | off ]
	Tag
	UIContextMenu
	UserData
	Visible: [ {on} | off ]

Ben


More information about the Help-octave mailing list