vispy.plot.plotwidget.
PlotWidget
Bases: vispy.scene.widgets.widget.Widget
vispy.scene.widgets.widget.Widget
Widget to facilitate plotting
Arguments passed to the ViewBox super class.
Keyword arguments passed to the ViewBox super class.
Notes
This class is typically instantiated implicitly by a Figure instance, e.g., by doing fig[0, 0].
fig[0, 0]
colorbar
Show a ColorBar
Either the name of the ColorMap to be used from the standard set of names (refer to vispy.color.get_colormap), or a custom ColorMap object. The ColorMap is used to apply a gradient on the colorbar.
The position of the colorbar with respect to the plot. ‘top’ and ‘bottom’ are placed horizontally, while ‘left’ and ‘right’ are placed vertically
The label that is to be drawn with the colorbar that provides information about the colorbar.
the minimum and maximum values of the data that is given to the colorbar. This is used to draw the scale on the side of the colorbar.
The width of the border the colormap should have. This measurement is given in pixels
The color of the border of the colormap. This can either be a str as the color’s name or an actual instace of a vipy.color.Color
See also
ColorBarWidget
histogram
Calculate and show a histogram of data
Data to histogram. Currently only 1D data is supported.
Number of bins, or bin edges.
Color of the histogram.
Orientation of the histogram.
The histogram polygon.
image
Show an image
Should have shape (N, M), (N, M, 3) or (N, M, 4).
Colormap name.
Colormap limits. Should be 'auto' or a two-element tuple of min and max values.
'auto'
Sets the plot foreground color if specified.
The image.
The colormap is only used if the image pixels are scalars.
mesh
Show a 3D mesh
Vertices.
Face definitions.
Vertex colors.
Face colors.
Color to use.
Filename to load. If not None, then vertices, faces, and meshdata must be None.
Meshdata to use. If not None, then vertices, faces, and fname must be None.
Shading to use, can be None, ‘smooth’, ‘flat’, or ‘auto’. Default (‘auto’) will use None if face_colors is set, and ‘smooth’ otherwise.
The mesh.
plot
Plot a series of data using lines and markers
Arguments can be passed as (Y,), (X, Y) or np.array((X, Y)).
(Y,)
(X, Y)
np.array((X, Y))
Color of the line.
Marker symbol to use.
Kind of line to draw. For now, only solid lines ('-') are supported.
'-'
Line width.
Marker size. If size == 0 markers will not be shown.
Color of the marker edge.
Color of the marker face.
Edge width of the marker.
The title string to be displayed above the plot
The label to display along the bottom axis
The label to display along the left axis.
Determines which vertices are connected by lines.
The line plot.
marker_types
LinePlot
spectrogram
Calculate and show a spectrogram
1D signal to operate on. If len(x) < n_fft, x will be zero-padded to length n_fft.
If len(x) < n_fft
n_fft
Number of FFT points. Much faster for powers of two.
Step size between calculations. If None, n_fft // 2 will be used.
n_fft // 2
The sample rate of the data.
Window function to use. Can be 'hann' for Hann window, or None for no windowing.
'hann'
Normalization of spectrogram values across frequencies.
Scale to apply to the result of the STFT. 'log' will use 10 * log10(power).
'log'
10 * log10(power)
The spectrogram.
Image
surface
Show a 3D surface plot.
Extra keyword arguments are passed to SurfacePlot().
A 2D array of the surface Z values.
volume
Show a 3D volume
Volume to render.
The contrast limits. The values in the volume are mapped to black and white corresponding to these values. Default maps between min and max.
The render style to use. See corresponding docs for details. Default ‘mip’.
The threshold to use for the isosurafce render style. By default the mean of the given volume is used.
The colormap to use.
The volume visualization.
Volume