ArrayAnimator#
- class mpl_animators.ArrayAnimator(data, image_axes=[-2, -1], axis_ranges=None, **kwargs)[source]#
Bases:
BaseFuncAnimatorCreate a Matplotlib backend independent data explorer.
The following keyboard shortcuts are defined in the viewer:
‘left’: previous step on active slider.
‘right’: next step on active slider.
‘top’: change the active slider up one.
‘bottom’: change the active slider down one.
‘p’: play/pause active slider.
This viewer can have user defined buttons added by specifying the labels and functions called when those buttons are clicked as keyword arguments.
- Parameters:
data (
numpy.ndarray) – The data to be visualized.image_axes (
list, optional) – A list of the axes order that make up the image.axis_ranges (
listof physical coordinates for thenumpy.ndarray, optional) – Defaults toNoneand array indices will be used for all axes. Thelistshould contain one element for each axis of thenumpy.ndarray. For the image axes a[min, max]pair should be specified which will be passed tomatplotlib.pyplot.imshowas an extent. For the slider axes a[min, max]pair can be specified or an array the same length as the axis which will provide all values for that slider.
Notes
Extra keywords are passed to
BaseFuncAnimator.Attributes Summary
A tuple version of
frame_sliceto be used when indexing arrays.Methods Summary
label_slider(i, label)Change the Slider label.
plot_start_image(ax)Abstract method for plotting first slice of array.
update_plot(val, artist, slider)Abstract method for updating the plot.
Attributes Documentation
- frame_index#
A tuple version of
frame_sliceto be used when indexing arrays.
Methods Documentation