Docs generated by wikimaker.py
Inherits from Wibject.
An Axes instance represents the scene with a local coordinate system in which wobjects can be drawn. It has various properties to influence the appearance of the scene, such as aspect ratio and lighting.
To set the appearance of the axis (the thing that indicates x, y and z), use the properties of the Axis instance. For example: Axes.axis.showGrid = True
The cameraType determines how the data is visualized and how the user can interact with the data.
The daspect property represents the aspect ratio of the data as a three element tuple. The sign of the elements indicate dimensions being flipped. (The function imshow() for example flips the y-dimension). If daspectAuto is False, all dimensions are always equally zoomed (The function imshow() sets this to False).
An Axes can be created with the function vv.subplot() or vv.gca().
The Axes class implements the following properties:
The Axes class implements the following methods:
Get the axis object associated with this axes. A new instance is created if it does not yet exist. This object can be used to change the appearance of the axis (tickmarks, labels, grid, etc.).
See also the Axis class.
Get/Set the axis type to use.
Currently supported are:
Get/Set the colors for the axes background gradient. If used, this value overrides the normal bgcolor property. Notes:
Get/Set the current camera.
Setting can be done using:
Interactively changing a camera
Get/Set the camera type to use.
Currently supported are:
Get/set the data aspect ratio of the current camera. Setting will also update daspect for the other cameras.
The daspect is a 3-element tuple (x,y,z). If a 2-element tuple is given, z is assumed 1. Note that only the ratio between the values matters (i.e. (1,1,1) equals (2,2,2)). When a value is negative, the corresponding dimension is flipped.
Note that if daspectAuto is True, the camera automatically changes its daspect to nicely scale the data to fit the screen (but the sign is preserved).
Get/Set whether to scale the dimensions independently.
If True, the camera changes the value of its daspect to nicely fit the data on screen (but the sign is preserved). This can happen (depending on the type of camera) during resetting, zooming, and resizing of the axes.
If set to False, the daspect of all cameras is reverted to the user-set daspect.
Get the data aspect ratio, normalized such that the x scaling is +/- 1.
Get/Set the string labels for the legend. Upon setting, a legend wibject is automatically shown.
Get the legend wibject, so for exampe its position can be changed programatically.
Get the default light source in the scene.
Get a list of all available lights in the scene. Only light0 is enabeled by default.
Get/Set the amount of motion blur when interacting with this axes. The value should be a number between 0 and 1. Note: this is a rather useless feature :)
Get position of mouse in screen pixels, relative to this axes.
Get/Set whether to use a buffer; after drawing, a screenshot of the result is obtained and stored. When the axes needs to be redrawn, but has not changed, the buffer can be used to draw the contents at great speed (default True).
Get a shallow copy of the list of wobjects in the scene.
Clear the axes. Removing all wobjects in the scene.
Calls Draw(fast) on its figure, as the total opengl canvas has to be redrawn. This might change in the future though.
Get the limits of the 2D axes as currently displayed. This can differ from what was set by SetLimits if the daspectAuto is False. Returns a tuple of limits for x and y, respectively.
Note: the limits are queried from the twod camera model, even if this is not the currently used camera.
Get a dictionary with the camera parameters. The parameters are named so they can be changed in a natural way and fed back using SetView(). Note that the parameters can differ for different camera types.
Make this the current axes. Also makes the containing figure the current figure.
Set the limits of the scene. For the 2D camera, these are taken as hints to set the camera view. For the 3D camear, they determine where the axis is drawn.
Returns a 3-element tuple of visvis.Range objects.
Set the camera view using the given dictionary with camera parameters. Camera parameters can also be passed as keyword/value pairs; these will supersede the values of the same key in s. If neither s nor any keywords are set, the camera is reset to its initial state.