figure

class itom.figure

Bases: itom.uiItem

figure([handle, [rows = 1, cols = 1]]) -> creates figure window.

The class itom.figure represents a standalone figure window, that can have various subplots. If an instance of this class is created without further parameters a new figure is created and opened having one subplot area (currently empty) and the numeric handle to this figure is returned:

h = figure() 

Subplots are arranged in a regular grid whose size is defined by the optional parameters ‘rows’ and ‘cols’. If you create a figure instance with a given handle, the instance is either a reference to an existing figure that has got this handle or if it does not exist, a new figure with the desired handle is opened and the handle is returned, too.

Parameters :

handle : {int}

numeric handle of the desired figure.

rows : {int, default: 1}

number of rows this figure should have (defines the size of the subplot-grid)

cols : {int, default: 1}

number of columns this figure should have (defines the size of the subplot-grid)

static close(handle|'all') -> static method to close any specific or all open figures (unless any figure-instance still keeps track of them)

This method closes and deletes any specific figure (given by handle) or all opened figures.

Parameters :

handle : {dataIO-Instance}

any figure handle (>0) or ‘all’ in order to close all opened figures

Notes

If any instance of class ‘figure’ still keeps a reference to any figure, it is only closed and deleted if the last instance is deleted, too.

hide() → hides figure without deleting it
liveImage(cam[, areaIndex, className]) → shows a camera live image in the current or given area of this figure

Creates a plot-image (2D) and automatically grabs images into this window. This function is not blocking.

Parameters :

cam : {dataIO-Instance}

Camera grabber device from which images are acquired.

areaIndex: {int}, optional :

className : {str}, optional

class name of desired plot (if not indicated default plot will be used (see application settings)

plot(data[, areaIndex, className]) → plots a dataObject in the current or given area of this figure

Plot an existing dataObject in not dockable, not blocking window. The style of the plot will depend on the object dimensions. If x-dim or y-dim are equal to 1, plot will be a lineplot else a 2D-plot.

Parameters :

data : {DataObject}

Is the data object whose region of interest will be plotted.

areaIndex: {int}, optional :

className : {str}, optional

class name of desired plot (if not indicated default plot will be used (see application settings)

show() → shows figure
subplot(index) → returns plotItem of desired subplot

This method closes and deletes any specific figure (given by handle) or all opened figures.

Parameters :

index : {unsigned int}

index to desired subplot. The subplot at the top, left position has the index 0 whereas the index is incremented row-wise.

docked

dock status of figure (True|False)

this attribute controls the dock appearance of this figure. If it is docked, the figure is integrated into the main window of itom, else it is a independent window.

handle

returns handle of figure

Previous topic

Algorithms, Widgets and Filters

Next topic

plotItem

This Page