6.2.1. itom.figure.plot#
- figure.plot(data, areaIndex=currentAreaIndex, className='', properties={}) plotItem #
Plots a dataObject, pointCloud or polygonMesh in the current or given area of this figure.
Plots an existing
dataObject
,pointCloud
orpolygonMesh
in the newly created plot. The style of the plot depends on the object dimensions.If no
className
is given, the type of the plot is chosen depending on the type and the size of the object. The defaults for several plot classes can be adjusted in the property dialog of itom.You can also set a class name of your preferred plot plugin (see also property dialog of itom). If your preferred plot is not able to display the given object, a warning is returned and the default plot type is used again. For
dataObject
, it is also possible to simply setclassName
to1D
,2D
or2.5D
in order to choose the default plot type depending on these aliases. ForpointCloud
andpolygonMesh
only the alias2.5D
is valid.Every plot has several properties that can be configured in the Qt Designer (if the plot is embedded in a GUI), or by the property toolbox in the plot itself or by using the
info()
method of the correspondingitom.uiItem
instance.Use the
properties
argument to pass a dictionary with properties you want to set to certain values.- Parameters:
- data
dataObject
orpointCloud
orpolygonMesh
Is the data object whose region of interest will be plotted.
- areaIndex
int
,optional
Area index where the plot canvas should be created (if subplots exists). The default
areaIndex
is the current subplot area, hence,0
if only one plot area exists in the figure.- className
str
,optional
class name of desired plot (if not indicated or if the
className
cannot be found, the default plot will be used (see application settings)- properties
dict
,optional
Optional dictionary of properties that will be directly applied to the plot widget.
- data
- Returns:
- plotHandle
plotItem
Handle of the subplot. This handle is used to control the properties of the plot, connect signals to it or call slots of the plot.
- plotHandle