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. Details on obtaining a list of valid application data properties can be found in 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.
© 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/Application_002ddefined-Data.html