A PlotData implementation class that handles a list of Numpy arrays (or a 2-D Numpy array).
By default, it doesn’t allow its input data to be modified by downstream Chaco components or interactors.
Map of names to arrays. Although there is no restriction on the array dimensions, each array must correspond to a single plot item; that is, a single name must not map to a multi-dimensional array unless the array is being used for an image plot or for something that can handle multi-dimensional input data.
Deletes the array specified by name, or raises a KeyError if the named array does not exist.
Returns the array associated with name.
Returns a list of the names of the arrays managed by this instance.
set_data(name, new_data, generate_name=False)¶
Sets the specified array as the value for either the specified name or a generated name.
If the instance’s writable attribute is True, then this method sets the data associated with the given name to the new value, otherwise it does nothing.
name (string) – The name of the array whose value is to be set.
new_data (array) – The array to set as the value of name.
generate_name (Boolean) – If True, a unique name of the form ‘seriesN’ is created for the array, and is used in place of name. The ‘N’ in ‘seriesN’ is one greater the largest N already used.
- Return type
The name under which the array was set.
Use if needing to set multiple ArrayPlotData entries at once, for example because new arrays’ dimensions change and updating one at a time would break an existing Plot.
Overrides AbstractPlotData to do nothing and not raise an error.
Updates any number of arrays before triggering a data_changed event.
Useful to set multiple ArrayPlotData entries at once, for example because new arrays’ dimensions change and updating one at a time would break an existing Plot.
Note: Implements AbstractPlotData’s update_data() method. This method has the same signature as the dictionary update() method.
Simpler interface to set only 1 entry at a time.
Consumers can write data to this object (overrides AbstractPlotData).