The classes in scene.visuals are visuals that may be added to a scenegraph using the methods and properties defined in vispy.scene.Node such as name, visible, parent, children, etc…
These classes are automatically generated by mixing vispy.scene.Node with the Visual classes found in vispy.visuals.
For developing custom visuals, it is recommended to subclass from vispy.visuals.Visual rather than vispy.scene.Node.
vispy.scene.visuals.
Arrow
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.line.arrow.ArrowVisual
vispy.scene.visuals.VisualNode
vispy.visuals.line.arrow.ArrowVisual
Arrow visual
This class inherits from visuals.ArrowVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
A special line visual which can also draw optional arrow heads at the specified vertices.
You add an arrow head by specifying two vertices v1 and v2 which represent the arrow body. This visual will draw an arrow head using v2 as center point, and the orientation of the arrow head is automatically determined by calculating the direction vector between v1 and v2.
Array of shape (…, 2) or (…, 3) specifying vertex coordinates.
The color to use when drawing the line. If an array is given, it must be of shape (…, 4) and provide one rgba color per vertex. Can also be a colormap name, or appropriate Function.
The parent node to assign to this node (optional).
A name for this node, used primarily for debugging (optional).
The width of the line in px. Line widths > 1px are only guaranteed to work when using ‘agg’ method.
Determines which vertices are connected by lines.
“strip” causes the line to be drawn with each vertex connected to the next. “segments” causes each pair of vertices to draw an independent line segment numpy arrays specify the exact set of segment pairs to connect.
“strip” causes the line to be drawn with each vertex connected to the next.
“segments” causes each pair of vertices to draw an independent line segment
numpy arrays specify the exact set of segment pairs to connect.
Mode to use for drawing.
“agg” uses anti-grain geometry to draw nicely antialiased lines with proper joins and endcaps. “gl” uses OpenGL’s built-in line rendering. This is much faster, but produces much lower-quality results and is not guaranteed to obey the requested line width or join/endcap styles.
“agg” uses anti-grain geometry to draw nicely antialiased lines with proper joins and endcaps.
“gl” uses OpenGL’s built-in line rendering. This is much faster, but produces much lower-quality results and is not guaranteed to obey the requested line width or join/endcap styles.
Enables or disables antialiasing. For method=’gl’, this specifies whether to use GL’s line smoothing, which may be unavailable or inconsistent on some platforms.
A (N, 4) or (N, 6) matrix where each row contains the (x, y) or the (x, y, z) coordinate of the first and second vertex of the arrow body. Remember that the second vertex is used as center point for the arrow head, and the first vertex is only used for determining the arrow head orientation.
Specify the arrow head type, the currently available arrow head types are:
stealth curved triangle_30 triangle_60 triangle_90 angle_30 angle_60 angle_90 inhibitor_round
stealth
curved
triangle_30
triangle_60
triangle_90
angle_30
angle_60
angle_90
inhibitor_round
Specify the arrow size
The arrow head color. If an array is given, it must be of shape (…, 4) and provide one rgba color per arrow head. Can also be a colormap name, or appropriate Function.
Axis
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.axis.AxisVisual
vispy.visuals.axis.AxisVisual
Axis visual
This class inherits from visuals.AxisVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
Co-ordinates of start and end of the axis.
The data values at the beginning and end of the axis, used for tick labels. i.e. (5, 10) means the axis starts at 5 and ends at 10. Default is (0, 1).
The tick direction to use (in document coordinates).
The type of scale. For now only ‘linear’ is supported.
RGBA values for the axis colour. Default is black.
RGBA values for the tick colours. The colour for the major and minor ticks is currently fixed to be the same. Default is a dark grey.
The color to use for drawing tick and axis labels
The length of minor ticks, in pixels
The length of major ticks, in pixels
Line width for the ticks
Margin between ticks and tick labels
The font size to use for rendering tick labels.
Line width for the axis
Text to use for the axis label
Margin between ticks and axis labels
The font size to use for rendering axis labels.
Font size for both the tick and axis labels. If this is set, tick_font_size and axis_font_size are ignored.
A 2-element iterable (tuple, list, etc.) giving the horizontal and vertical alignment of the tick labels. The first element should be one of ‘left’, ‘center’, or ‘right’, and the second element should be one of ‘bottom’, ‘middle’, or ‘top’. If this is not specified, it is determined automatically.
Box
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.box.BoxVisual
vispy.visuals.box.BoxVisual
Visual that displays a box.
This class inherits from visuals.BoxVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
Box width.
Box height.
Box depth.
Box segments count along the width.
Box segments count along the height.
Box segments count along the depth.
Any combination of {'-x', '+x', '-y', '+y', '-z', '+z'} Included planes in the box construction.
{'-x', '+x', '-y', '+y', '-z', '+z'}
Same as for MeshVisual class. See create_plane for vertex ordering.
The Color to use when drawing the cube faces.
The Color to use when drawing the cube edges. If None, then no cube edges are drawn.
ColorBar
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.colorbar.ColorBarVisual
vispy.visuals.colorbar.ColorBarVisual
Visual subclass displaying a colorbar
This class inherits from visuals.ColorBarVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
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 orientation of the colorbar, used for rendering. The orientation can be thought of as the position of the label relative to the color bar.
When the orientation is ‘left’ or ‘right’, the colorbar is vertically placed. When it is ‘top’ or ‘bottom’, the colorbar is horizontally placed.
‘top’: the colorbar is horizontal. Color is applied from left to right. Minimum corresponds to left and maximum to right. Label is to the top of the colorbar ‘bottom’: Same as top, except that label is to the bottom of the colorbar ‘left’: the colorbar is vertical. Color is applied from bottom to top. Minimum corresponds to bottom and maximum to top. Label is to the left of the colorbar ‘right’: Same as left, except that the label is placed to the right of the colorbar
‘top’: the colorbar is horizontal. Color is applied from left to right. Minimum corresponds to left and maximum to right. Label is to the top of the colorbar
‘bottom’: Same as top, except that label is to the bottom of the colorbar
‘left’: the colorbar is vertical. Color is applied from bottom to top. Minimum corresponds to bottom and maximum to top. Label is to the left of the colorbar
‘right’: Same as left, except that the label is placed to the right of the colorbar
lengths with respect to the major and minor axes. The minor axis is the shorter axis, while the major axis is the longer axis with respect to the orientation
For orientations ‘top’ and ‘bottom’, the major axis is along the length.
For orientations ‘left’ and ‘right’, the major axis is along the breadth
Position where the colorbar is to be placed with respect to the center of the colorbar
The label that is to be drawn with the colorbar that provides information about the colorbar.
The color of the labels. This can either be a str as the color’s name or an actual instace of a vipy.color.Color
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
Compound
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.visual.CompoundVisual
vispy.visuals.visual.CompoundVisual
Visual consisting entirely of sub-visuals.
This class inherits from visuals.CompoundVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
To the user, a compound visual behaves exactly like a normal visual–it has a transform system, draw() and bounds() methods, etc. Internally, the compound visual automatically manages proxying these transforms and methods to its sub-visuals.
The list of visuals to be combined in this compound visual.
Cube
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.cube.CubeVisual
vispy.visuals.cube.CubeVisual
Visual that displays a cube or cuboid
This class inherits from visuals.CubeVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
The size of the cuboid. A float gives a cube, whereas tuples may specify the size of each axis (x, y, z) independently.
Same as for MeshVisual class. See create_cube for vertex ordering.
Ellipse
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.ellipse.EllipseVisual
vispy.visuals.ellipse.EllipseVisual
Displays a 2D ellipse
This class inherits from visuals.EllipseVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
Center of the ellipse
The face color to use.
The border color to use.
The width of the border in pixels Line widths > 1px are only guaranteed to work when using border_method=’agg’ method.
Radius or radii of the ellipse Defaults to (0.1, 0.1)
Start angle of the ellipse in degrees Defaults to 0.
Span angle of the ellipse in degrees Defaults to 360.
Number of segments to be used to draw the ellipse Defaults to 100
Keyword arguments to pass to PolygonVisual.
Graph
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.graphs.graph.GraphVisual
vispy.visuals.graphs.graph.GraphVisual
Visual for displaying graphs or networks.
This class inherits from visuals.GraphVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
The adjacency matrix of the graph.
Whether the graph is directed or not. If True, then this visual will draw arrows for the directed edges.
They layout to use.
Whether or not to animate.
vispy.color.colormap.ColorMap
The color to use for the edges.
The edge thickness.
The kind of arrow head to use. See vispy.visuals.ArrowHead for more information.
vispy.visuals.ArrowHead
The size of the arrow head.
The marker to use for nodes. See vispy.visuals.MarkersVisual for more information.
vispy.visuals.MarkersVisual
The size of the node
The border color for nodes.
The face color for nodes.
The border size for nodes.
See also
ArrowVisual
MarkersVisual
GridLines
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.gridlines.GridLinesVisual
vispy.visuals.gridlines.GridLinesVisual
Displays regularly spaced grid lines in any coordinate system and at any scale.
This class inherits from visuals.GridLinesVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
The scale factors to apply when determining the spacing of grid lines.
The base color for grid lines. The final color may have its alpha channel modified.
GridMesh
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.gridmesh.GridMeshVisual
vispy.visuals.gridmesh.GridMeshVisual
Displays a mesh in a Cartesian grid about x,y,z coordinates.
This class inherits from visuals.GridMeshVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
This makes it simple to generate a mesh from e.g. the output of numpy.meshgrid.
All arguments are optional, though they can be changed individually later with the set_data method.
A 2d array of x coordinates for the vertices of the mesh. Must have the same dimensions as ys and zs.
A 2d array of y coordinates for the vertices of the mesh. Must have the same dimensions as xs and zs.
A 2d array of z coordinates for the vertices of the mesh. Must have the same dimensions as xs and ys.
The colors of the points of the mesh. Should be either a (width, height, 4) array of rgba colors at each grid point or a (width, height, 3) array of rgb colors at each grid point. Defaults to None, in which case the default color of a MeshVisual is used.
Same as for the MeshVisual class. Defaults to ‘smooth’.
Other arguments are passed directly to MeshVisual.
Histogram
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.histogram.HistogramVisual
vispy.visuals.histogram.HistogramVisual
Visual that calculates and displays a histogram of data
This class inherits from visuals.HistogramVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
Data to histogram. Currently only 1D data is supported.
Number of bins, or bin edges.
Color of the histogram.
Orientation of the histogram.
Image
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.image.ImageVisual
vispy.visuals.image.ImageVisual
Visual subclass displaying an image.
This class inherits from visuals.ImageVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
ImageVisual data. Can be shape (M, N), (M, N, 3), or (M, N, 4).
Selects method of rendering image in case of non-linear transforms. Each method produces similar results, but may trade efficiency and accuracy. If the transform is linear, this parameter is ignored and a single quad is drawn around the area of the image.
‘auto’: Automatically select ‘impostor’ if the image is drawn with a nonlinear transform; otherwise select ‘subdivide’. ‘subdivide’: ImageVisual is represented as a grid of triangles with texture coordinates linearly mapped. ‘impostor’: ImageVisual is represented as a quad covering the entire view, with texture coordinates determined by the transform. This produces the best transformation results, but may be slow.
‘auto’: Automatically select ‘impostor’ if the image is drawn with a nonlinear transform; otherwise select ‘subdivide’.
‘subdivide’: ImageVisual is represented as a grid of triangles with texture coordinates linearly mapped.
‘impostor’: ImageVisual is represented as a quad covering the entire view, with texture coordinates determined by the transform. This produces the best transformation results, but may be slow.
If method=’subdivide’, this tuple determines the number of rows and columns in the image grid.
Colormap to use for luminance images.
Limits to use for the colormap. Can be ‘auto’ to auto-set bounds to the min and max of the data.
Gamma to use during colormap lookup. Final color will be cmap(val**gamma). by default: 1.
Selects method of image interpolation. Makes use of the two Texture2D interpolation methods and the available interpolation methods defined in vispy/gloo/glsl/misc/spatial_filters.frag
‘nearest’: Default, uses ‘nearest’ with Texture2D interpolation. ‘bilinear’: uses ‘linear’ with Texture2D interpolation. ‘hanning’, ‘hamming’, ‘hermite’, ‘kaiser’, ‘quadric’, ‘bicubic’,‘catrom’, ‘mitchell’, ‘spline16’, ‘spline36’, ‘gaussian’, ‘bessel’, ‘sinc’, ‘lanczos’, ‘blackman’
‘nearest’: Default, uses ‘nearest’ with Texture2D interpolation.
‘bilinear’: uses ‘linear’ with Texture2D interpolation.
‘catrom’, ‘mitchell’, ‘spline16’, ‘spline36’, ‘gaussian’, ‘bessel’, ‘sinc’, ‘lanczos’, ‘blackman’
Keyword arguments to pass to Visual.
Notes
The colormap functionality through cmap and clim are only used if the data are 2D.
cmap
clim
InfiniteLine
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.infinite_line.InfiniteLineVisual
vispy.visuals.infinite_line.InfiniteLineVisual
Infinite horizontal or vertical line for 2D plots.
This class inherits from visuals.InfiniteLineVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
Position of the line along the axis.
The color to use when drawing the line. If an array is given, it must be of shape (1, 4) and provide one rgba color per vertex.
True for drawing a vertical line, False for an horizontal line
Isocurve
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.isocurve.IsocurveVisual
vispy.visuals.isocurve.IsocurveVisual
Displays an isocurve of a 2D scalar array.
This class inherits from visuals.IsocurveVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
2D scalar array.
The levels at which the isocurve is constructed from “data”.
The color to use when drawing the line. If a list is given, it must be of shape (Nlev), if an array is given, it must be of shape (Nlev, …). and provide one color per level (rgba, colorname).
(min, max) limits to apply when mapping level values through a colormap.
Keyword arguments to pass to LineVisual.
Isoline
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.isoline.IsolineVisual
vispy.visuals.isoline.IsolineVisual
Isocurves of a tri mesh with data at vertices at different levels.
This class inherits from visuals.IsolineVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
Vertex coordinates.
Indices into the vertex array.
scalar at vertices
The color to use when drawing the line. If an array is given, it must be of shape (Nlev, 4) and provide one rgba color by level.
Isosurface
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.isosurface.IsosurfaceVisual
vispy.visuals.isosurface.IsosurfaceVisual
Displays an isosurface of a 3D scalar array.
This class inherits from visuals.IsosurfaceVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
3D scalar array.
The level at which the isosurface is constructed from data.
The vertex colors to use.
The face colors to use.
The color to use.
Keyword arguments to pass to the mesh construction.
Line
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.line.line.LineVisual
vispy.visuals.line.line.LineVisual
Line visual
This class inherits from visuals.LineVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
LinePlot
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.line_plot.LinePlotVisual
vispy.visuals.line_plot.LinePlotVisual
Visual displaying a plot line with optional markers.
This class inherits from visuals.LinePlotVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
Arguments can be passed as (Y,), (X, Y), (X, Y, Z) or np.array((X, Y)), np.array((X, Y, Z)).
(Y,)
(X, Y)
(X, Y, Z)
np.array((X, Y))
np.array((X, Y, Z))
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.
See LineVisual.
Argements to pass to the super class.
LineVisual
marker_types
Examples
All of these syntaxes will work:
>>> LinePlotVisual(y_vals) >>> LinePlotVisual(x_vals, y_vals) >>> LinePlotVisual(xy_vals)
LinearRegion
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.linear_region.LinearRegionVisual
vispy.visuals.linear_region.LinearRegionVisual
Infinite horizontal or vertical region for 2D plots.
This class inherits from visuals.LinearRegionVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
Bounds of the region along the axis. len(pos) must be >=2.
The color to use when drawing the line. It must have a shape of (1, 4) for a single color region or (len(pos), 4) for a multicolor region.
True for drawing a vertical region, False for an horizontal region
Markers
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.markers.MarkersVisual
vispy.visuals.markers.MarkersVisual
Visual displaying marker symbols.
This class inherits from visuals.MarkersVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
Mesh
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.mesh.MeshVisual
vispy.visuals.mesh.MeshVisual
Mesh visual
This class inherits from visuals.MeshVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
The vertices.
The faces.
Colors to use for each vertex.
Colors to use for each face.
The values to use for each vertex (for colormapping).
The meshdata.
Shading to use.
The drawing mode.
Plane
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.plane.PlaneVisual
vispy.visuals.plane.PlaneVisual
Visual that displays a plane.
This class inherits from visuals.PlaneVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
Plane width.
Plane height.
Plane segments count along the width.
Plane segments count along the height.
{'-x', '+x', '-y', '+y', '-z', '+z'} Direction the plane will be facing.
Polygon
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.polygon.PolygonVisual
vispy.visuals.polygon.PolygonVisual
Displays a 2D polygon
This class inherits from visuals.PolygonVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
Set of vertices defining the polygon.
Fill color of the polygon.
Border color of the polygon.
Border width in pixels. Line widths > 1px are only guaranteed to work when using border_method=’agg’ method.
Mode to use for drawing the border line (see LineVisual).
Triangulate the set of vertices
Keyword arguments to pass to CompoundVisual.
Rectangle
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.rectangle.RectangleVisual
vispy.visuals.rectangle.RectangleVisual
Displays a 2D rectangle with optional rounded corners
This class inherits from visuals.RectangleVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
Center of the rectangle
The fill color to use.
Length of the rectangle along y-axis Defaults to 1.0
Length of the rectangle along x-axis Defaults to 1.0
Radii of curvatures of corners in clockwise order from top-left Defaults to 0.
RegularPolygon
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.regular_polygon.RegularPolygonVisual
vispy.visuals.regular_polygon.RegularPolygonVisual
Displays a regular polygon
This class inherits from visuals.RegularPolygonVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
Center of the regular polygon
Fill color of the polygon
Border color of the polygon
The width of the border in pixels
Radius of the regular polygon Defaults to 0.1
Number of sides of the regular polygon
ScrollingLines
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.scrolling_lines.ScrollingLinesVisual
vispy.visuals.scrolling_lines.ScrollingLinesVisual
Displays many line strips of equal length, with the option to add new vertex data to one end of the lines.
This class inherits from visuals.ScrollingLinesVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
The number of independent line strips to draw.
The number of samples in each line strip.
The x distance between samples
An array of colors to assign to each line strip.
An array of x, y position offsets to apply to each line strip.
Arrange line strips into a grid with this number of columns. This option is not compatible with pos_offset.
The x, y distance between cells in the grid.
Spectrogram
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.spectrogram.SpectrogramVisual
vispy.visuals.spectrogram.SpectrogramVisual
Calculate and show a spectrogram
This class inherits from visuals.SpectrogramVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
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)
Colormap name.
Colormap limits. Should be 'auto' or a two-element tuple of min and max values.
'auto'
Sphere
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.sphere.SphereVisual
vispy.visuals.sphere.SphereVisual
Visual that displays a sphere
This class inherits from visuals.SphereVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
The size of the sphere.
Number of cols that make up the sphere mesh (for method=’latitude’ and ‘cube’).
Number of rows that make up the sphere mesh (for method=’latitude’ and ‘cube’).
Number of depth segments that make up the sphere mesh (for method=’cube’).
Number of subdivisions to perform (for method=’ico’).
Method for generating sphere. Accepts ‘latitude’ for latitude-longitude, ‘ico’ for icosahedron, and ‘cube’ for cube based tessellation.
Same as for MeshVisual class. See create_sphere for vertex ordering.
The Color to use when drawing the sphere faces.
The Color to use when drawing the sphere edges. If None, then no sphere edges are drawn.
SurfacePlot
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.surface_plot.SurfacePlotVisual
vispy.visuals.surface_plot.SurfacePlotVisual
Displays a surface plot on a regular x,y grid
This class inherits from visuals.SurfacePlotVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
1D/2D array of values specifying the x positions of vertices in the grid. In case 1D array given as input, the values will be replicated to fill the 2D array of size(z). If None, values will be assumed to be integers.
1D/2D array of values specifying the y positions of vertices in the grid. In case 1D array given as input, the values will be replicated to fill the 2D array of size(z). If None, values will be assumed to be integers.
2D array of height values for each grid vertex.
(width, height, 4) array of vertex colors.
All arguments are optional.
Note that if vertex positions are updated, the normal vectors for each triangle must be recomputed. This is somewhat expensive if the surface was initialized with smooth=False and very expensive if smooth=True. For faster performance, initialize with compute_normals=False and use per-vertex colors or a material that does not require normals.
Text
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.text.text.TextVisual
vispy.visuals.text.text.TextVisual
Visual that displays text
This class inherits from visuals.TextVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
extensions (see comments in fragment shader below).
Text to display. Can also be a list of strings. Note: support for list of str might be removed soon in favor of text collections.
Color to use.
Bold face.
Italic face.
Font face to use.
Point size to use.
Position (x, y) or (x, y, z) of the text. Can also be a list of tuple if text is a list.
Rotation (in degrees) of the text clockwise.
Horizontal text anchor.
Vertical text anchor.
Rendering method for text characters. Either ‘cpu’ (default) or ‘gpu’. The ‘cpu’ method should perform better on remote backends like those based on WebGL. The ‘gpu’ method should produce higher quality results.
Font manager to use (can be shared if the GLContext is shared).
Tube
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.tube.TubeVisual
vispy.visuals.tube.TubeVisual
Displays a tube around a piecewise-linear path.
This class inherits from visuals.TubeVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
The tube mesh is corrected following its Frenet curvature and torsion such that it varies smoothly along the curve, including if the tube is closed.
An array of (x, y, z) points describing the path along which the tube will be extruded.
The radius of the tube. Use array of floats as input to set radii of points individually. Defaults to 1.0.
Whether the tube should be closed, joining the last point to the first. Defaults to False.
The color(s) to use when drawing the tube. The same color is applied to each vertex of the mesh surrounding each point of the line. If the input is a ColorArray, the argument will be cycled; for instance if ‘red’ is passed then the entire tube will be red, or if [‘green’, ‘blue’] is passed then the points will alternate between these colours. Defaults to ‘purple’.
The number of points in the circle-approximating polygon of the tube’s cross section. Defaults to 8.
Same as for the MeshVisual class.
Same as for the MeshVisual class. Defaults to ‘triangles’.
VisualNode
Bases: vispy.scene.node.Node
vispy.scene.node.Node
draw
interactive
Whether this widget should be allowed to accept mouse and touch events.
picking
Boolean that determines whether this node (and its children) are drawn in picking mode.
Volume
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.volume.VolumeVisual
vispy.visuals.volume.VolumeVisual
Displays a 3D Volume
This class inherits from visuals.VolumeVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
The volume to display. Must be ndim==3.
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 method to use. See corresponding docs for details. Default ‘mip’.
The threshold to use for the isosurface render method. By default the mean of the given volume is used.
The relative step size to step through the volume. Default 0.8. Increase to e.g. 1.5 to increase performance, at the cost of quality.
Colormap to use.
When changing the clims, if the new clim range is smaller than this fraction of the last-used texture data range, then it will trigger a rescaling of the texture data. For instance: if the texture data was last scaled from 0-1, and the clims are set to 0.4-0.5, then a texture rescale will be triggered if clim_range_threshold < 0.1. To prevent rescaling, set this value to 0. To always rescale, set the value to >= 1. By default, 0.2
clim_range_threshold < 0.1
Use 2D textures to emulate a 3D texture. OpenGL ES 2.0 compatible, but has lower performance on desktop platforms.
Selects method of image interpolation.
Windbarb
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.windbarb.WindbarbVisual
vispy.visuals.windbarb.WindbarbVisual
Visual displaying windbarbs.
This class inherits from visuals.WindbarbVisual and scene.Node, allowing the visual to be placed inside a scenegraph.
XYZAxis
Bases: vispy.scene.visuals.VisualNode, vispy.visuals.xyz_axis.XYZAxisVisual
vispy.visuals.xyz_axis.XYZAxisVisual
Simple 3D axis for indicating coordinate system orientation. Axes are x=red, y=green, z=blue.
This class inherits from visuals.XYZAxisVisual and scene.Node, allowing the visual to be placed inside a scenegraph.