vispy.plot.fig module

class vispy.plot.fig.Fig(bgcolor='w', size=(800, 600), show=True, keys='interactive', **kwargs)[source]

Bases: vispy.scene.canvas.SceneCanvas

Create a figure window

Parameters
bgcolorinstance of Color

Color to use for the background.

sizetuple

Size of the figure window in pixels.

showbool

If True, show the window.

**kwargsdict

Keywoard arguments to pass to SceneCanvas base class.

See also

PlotWidget

the axis widget for plotting

SceneCanvas

the super class

Notes

You can create a Figure, PlotWidget, and diagonal line plot like this:

>>> from vispy.plot import Fig
>>> fig = Fig()
>>> ax = fig[0, 0]  # this creates a PlotWidget
>>> ax.plot([[0, 1], [1, 0]])

See the gallery for many other examples.

property plot_widgets

List of the associated PlotWidget instances