chaco.function_image_data module

class chaco.function_image_data.FunctionImageData(**kw)

Bases: chaco.image_data.ImageData

A class that provides data for a 2-D image based upon the range supplied. This class can be used as the data source for an image plot or contour plot.

Computation should be fairly swift for acceptable interactive performance.

data_range = Instance(DataRange2D)

the 2D data_range required for the data shown

func = Callable

The function to call with the low and high values of the range in the x and y dimensions. It should return either a 2-D array of numerical values, or an array of RGB or RGBA values (shape should be (n, m), (n, m, 3) or (n, m, 4)).

recalculate(event=None)
remove_mask()
set_data(*args, **kw)

Sets the data for this data source.

Parameters

data (array) – The data to use.

set_mask(mask)