15.4.5 Application-defined Data

Octave has a provision for attaching application-defined data to a graphics handle. The data can be anything which is meaningful to the application, and will be completely ignored by Octave.

 
: setappdata (h, name, value)
: setappdata (h, name1, value1, name2, value3, …)
: setappdata (h, {name1, name2, …}, {value1, value2, …})

Set the application data name to value for the graphics object with handle h.

h may also be a vector of graphics handles. If the application data with the specified name does not exist, it is created.

Multiple name/value pairs can be specified. Alternatively, a cell array of names and a corresponding cell array of values can be specified. For details on obtaining a list of valid application data properties, see getappdata.

See also: getappdata, isappdata, rmappdata, guidata, get, set, getpref, setpref.

 
: value = getappdata (h, name)
: appdata = getappdata (h)

Return the value of the application data name for the graphics object with handle h.

h may also be a vector of graphics handles. If no second argument name is given then getappdata returns a structure, appdata, whose fields correspond to the appdata properties.

See also: setappdata, isappdata, rmappdata, guidata, get, set, getpref, setpref.

 
: rmappdata (h, name)
: rmappdata (h, name1, name2, …)

Delete the application data name from the graphics object with handle h.

h may also be a vector of graphics handles. Multiple application data names may be supplied to delete several properties at once.

See also: setappdata, getappdata, isappdata.

 
: valid = isappdata (h, name)

Return true if the named application data, name, exists for the graphics object with handle h.

h may also be a vector of graphics handles.

See also: getappdata, setappdata, rmappdata, guidata, get, set, getpref, setpref.