15.3.3.2 Figure Properties

Properties of figure objects (see figure):

alphamap: def. 64-by-1 double

Transparency is not yet implemented for figure objects. alphamap is unused.

beingdeleted: {"off"} | "on"
busyaction: "cancel" | {"queue"}

Define how Octave handles the execution of this object’s callback properties when it is unable to interrupt another object’s executing callback. This is only relevant when the currently executing callback object has its interruptible property set to "off". The busyaction property of the interrupting callback object indicates whether the interrupting callback is queued ("queue" (default)) or discarded ("cancel"). See Callbacks section.

buttondownfcn: string | function handle, def. [](0x0)

For information on how to write graphics listener functions see Callbacks section.

children (read-only): vector of graphics handles, def. [](0x1)

Graphics handles of the figure’s children.

clipping: "off" | {"on"}

clipping is unused.

closerequestfcn: string | function handle, def. "closereq"

Function that is executed when a figure is deleted. See closereq function.

For information on how to write graphics listener functions see Callbacks section.

color: colorspec, def. [1 1 1]

Color of the figure background. See colorspec.

colormap: N-by-3 matrix, def. 64-by-3 double

A matrix containing the RGB color map for the current axes.

createfcn: string | function handle, def. [](0x0)

Callback function executed immediately after figure has been created. Function is set by using default property on root object, e.g., set (groot, "defaultfigurecreatefcn", 'disp ("figure created!")').

For information on how to write graphics listener functions see Callbacks section.

currentaxes: graphics handle, def. [](0x0)

Handle to the graphics object of the current axes.

currentcharacter (read-only): def. ""

currentcharacter is unused.

currentobject (read-only): graphics handle, def. [](0x0)
currentpoint (read-only): two-element vector, def. [0; 0]

A 1-by-2 matrix which holds the coordinates of the point over which the mouse pointer was when a mouse event occurred. The X and Y coordinates are in units defined by the figure’s units property and their origin is the lower left corner of the plotting area.

Events which set currentpoint are

A mouse button was pressed

always

A mouse button was released

only if the figure’s callback windowbuttonupfcn is defined

The pointer was moved while pressing the mouse button (drag)

only if the figure’s callback windowbuttonmotionfcn is defined

deletefcn: string | function handle, def. [](0x0)

Callback function executed immediately before figure is deleted.

For information on how to write graphics listener functions see Callbacks section.

dockcontrols: {"off"} | "on"

dockcontrols is unused.

filename: string, def. ""

The filename used when saving the plot figure.

graphicssmoothing: "off" | {"on"}

Use smoothing techniques to reduce the appearance of jagged lines.

handlevisibility: "callback" | "off" | {"on"}

If handlevisibility is "off", the figure’s handle is not visible in its parent’s "children" property.

hittest: "off" | {"on"}

Specify whether figure processes mouse events or passes them to ancestors of the object. When enabled, the object may respond to mouse clicks by evaluating the "buttondownfcn", showing the uicontextmenu, and eventually becoming the root "currentobject". This property is only relevant when the object can accept mouse clicks which is determined by the "pickableparts" property. See pickableparts property.

integerhandle: "off" | {"on"}

Assign the next lowest unused integer as the Figure number.

interruptible: "off" | {"on"}

Specify whether this object’s callback functions may be interrupted by other callbacks. By default interruptible is "on" and callbacks that make use of drawnow, figure, waitfor, getframe or pause functions are eventually interrupted. See Callbacks section.

inverthardcopy: "off" | {"on"}

Replace the figure and axes background color with white when printing.

keypressfcn: string | function handle, def. [](0x0)

Callback function executed when a keystroke event happens while the figure has focus. The actual key that was pressed can be retrieved using the second argument ’evt’ of the function. For information on how to write graphics listener functions see Callbacks section.

keyreleasefcn: string | function handle, def. [](0x0)

With keypressfcn, the keyboard callback functions. These callback functions are called when a key is pressed/released respectively. The functions are called with two input arguments. The first argument holds the handle of the calling figure. The second argument holds an event structure which has the following members:

Character:

The ASCII value of the key

Key:

Lowercase value of the key

Modifier:

A cell array containing strings representing the modifiers pressed with the key.

For information on how to write graphics listener functions see Callbacks section.

menubar: {"figure"} | "none"

Control the display of the figure menu bar at the top of the figure.

name: string, def. ""

Name to be displayed in the figure title bar. The name is displayed to the right of any title determined by the numbertitle property.

nextplot: {"add"} | "new" | "replace" | "replacechildren"

nextplot is used by high level plotting functions to decide what to do with axes already present in the figure. See newplot function.

number (read-only):
numbertitle: "off" | {"on"}

Display "Figure" followed by the numerical figure handle value in the figure title bar.

outerposition: four-element vector, def. [-1 -1 -1 -1]

Specify the position and size of the figure including the top menubar and the bottom status bar. The four elements of the vector are the coordinates of the lower left corner and width and height of the figure. See units property.

paperorientation: "landscape" | {"portrait"}

The value for the papersize, and paperposition properties depends upon paperorientation. The horizontal and vertical values for papersize and paperposition reverse order when paperorientation is switched between "portrait" and "landscape".

paperposition: four-element vector, def. [1.3422 3.3191 5.8156 4.3617]

Vector [left bottom width height] defining the position and size of the figure (in paperunits units) on the printed page. The position [left bottom] defines the lower left corner of the figure on the page, and the size is defined by [width height]. For output formats not implicitly rendered on paper, width and height define the size of the image and the position information is ignored. Setting paperposition also forces the paperpositionmode property to be set to "manual".

paperpositionmode: {"auto"} | "manual"

If paperpositionmode is set to "auto", the paperposition property is automatically computed: the printed figure will have the same size as the on-screen figure and will be centered on the output page. Setting the paperpositionmode to "auto" does not modify the value of the paperposition property.

papersize: two-element vector, def. [8.5000 11.0000]

Vector [width height] defining the size of the paper for printing. Setting the papersize property to a value, not associated with one of the defined papertypes and consistent with the setting for paperorientation, forces the papertype property to the value "<custom>". If papersize is set to a value associated with a supported papertype and consistent with the paperorientation, the papertype value is modified to the associated value.

papertype: "<custom>" | "a" | "a0" | "a1" | "a2" | "a3" | "a4" | "a5" | "arch-a" | "arch-b" | "arch-c" | "arch-d" | "arch-e" | "b" | "b0" | "b1" | "b2" | "b3" | "b4" | "b5" | "c" | "d" | "e" | "tabloid" | "uslegal" | {"usletter"}

Name of the paper used for printed output. Setting papertype also changes papersize, while maintaining consistency with the paperorientation property.

paperunits: "centimeters" | {"inches"} | "normalized" | "points"

The unit used to compute the paperposition property. The conversion from physical units (e.g., "inches") is dependent on the screenpixelsperinch property of the root object.

parent: graphics handle, def. 0

Handle of the parent graphics object.

pickableparts (read-only): "all" | "none" | {"visible"}

pickableparts is unused.

pointer: {"arrow"} | "botl" | "botr" | "bottom" | "circle" | "cross" | "crosshair" | "custom" | "fleur" | "hand" | "ibeam" | "left" | "right" | "top" | "topl" | "topr" | "watch"

Name of the mouse pointer shape associated with the canvas of the figure. When pointer is "custom", the shape is determined by the pointershapecdata property.

pointer has no effect when the figure is in zoom, pan, or rotate mode. In this case, Octave automatically uses a pointer shape appropriate to the mode.

pointershapecdata: 16-by-16 or 32-by-32 Matrix, def. 16-by-16 double

m-by-m matrix defining a custom pointer. Each element defines a pixel with the element (1,1) representing the top-left pixel. A value of 1 is colored black, a value of 2 is colored white, and all other values are rendered as transparent.

pointershapehotspot: two-element vector, def. [1 1]

For custom pointers only pointershapehotspot defines the row and column of the pixel in pointershapecdata that is used as the pointer location.

position: four-element vector, def. [300 200 560 420]

Specify the position and size of the figure canvas. The four elements of the vector are the coordinates of the lower left corner and width and height of the figure. See units property.

renderer: {"opengl"} | "painters"

Rendering engine used for printing when renderermode is "manual". Setting renderer also forces the renderermode property to be set to "manual".

renderermode: {"auto"} | "manual"

Control whether the rendering engine used for printing is chosen automatically or specified by the renderer property. See print function.

resize: "off" | {"on"}

Control whether the figure can be resized by dragging the window borders and corners using a mouse. When resize is "off" mouse interactions are disabled but the figure can still be resized by changing its "position" property.

resizefcn: string | function handle, def. [](0x0)

resizefcn is deprecated. Use sizechangedfcn instead.

selected: {"off"} | "on"
selectionhighlight: "off" | {"on"}
selectiontype: "alt" | "extend" | {"normal"} | "open"

Selection type of the latest mouse click.

selectiontype may take different values depending on the combination of mouse button and keyboard modifier that were used:

normal:

Left-click.

alt:

Right-click or Ctrl+Left-click.

extend:

Shitf+Left-click, Middle click, or combined Left-click and Right-click.

open:

Double Left-click.

sizechangedfcn: string | function handle, def. [](0x0)

Callback triggered when the figure window size is changed.

For information on how to write graphics listener functions see Callbacks section.

tag: string, def. ""

A user-defined string to label the graphics object.

toolbar: {"auto"} | "figure" | "none"

Control the display of the toolbar (along the bottom of the menubar) and the status bar. When set to "auto", the display is based on the value of the menubar property.

type (read-only): string

Class name of the graphics object. type is always "figure"

uicontextmenu: graphics handle, def. [](0x0)

Graphics handle of the uicontextmenu object that is currently associated to this figure object.

units: "centimeters" | "characters" | "inches" | "normalized" | {"pixels"} | "points"

The unit used to compute the position and outerposition properties.

userdata: Any Octave data, def. [](0x0)

User-defined data to associate with the graphics object.

visible: "off" | {"on"}

If visible is "off", the figure is not rendered on screen.

windowbuttondownfcn: string | function handle, def. [](0x0)

See windowbuttonupfcn property.

windowbuttonmotionfcn: string | function handle, def. [](0x0)

See windowbuttonupfcn property.

windowbuttonupfcn: string | function handle, def. [](0x0)

With windowbuttondownfcn and windowbuttonmotionfcn, the mouse callback functions. These callback functions are called when a mouse button is pressed, dragged, or released respectively. When these callback functions are executed, the currentpoint property holds the current coordinates of the cursor.

For information on how to write graphics listener functions see Callbacks section.

windowkeypressfcn: string | function handle, def. [](0x0)

Function that is executed when a key is pressed and the figure has focus.

For information on how to write graphics listener functions see Callbacks section.

windowkeyreleasefcn: string | function handle, def. [](0x0)

Function that is executed when a key is released and the figure has focus.

For information on how to write graphics listener functions see Callbacks section.

windowscrollwheelfcn: string | function handle, def. [](0x0)

Function that is executed when a user manipulates the mouse wheel over this figure. The function is called with two input arguments. The first argument holds the handle of the calling figure. The second argument holds an event structure which has the following members:

VerticalScrollCount:

The number of wheel steps, typically 1 when scrolling down and -1 when scrolling up.

VerticalScrollAmount:

The number of lines a wheel step should scroll. This value is always 3.

EventName:

The event name which is "WindowScrollWheel".

For information on how to write graphics listener functions see Callbacks section.

windowstyle: "docked" | "modal" | {"normal"}

The window style of a figure. One of the following values:

normal

Set the window style as non modal.

modal

Set the window as modal so that it will stay on top of all normal figures.

docked

Setting the window style as docked currently does not dock the window.

Changing modes of a visible figure may cause the figure to close and reopen.

© 1996–2020 John W. Eaton
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions.
https://octave.org/doc/v6.3.0/Figure-Properties.html