scitools.easyviz.vtk_

class scitools.easyviz.vtk_.VtkBackend[source]

Bases: scitools.easyviz.common.BaseClass

Backend using VTK.

Methods

autumn([m])
axes(*args, **kwargs) Create axes in specified positions.
axis(*args, **kwargs) Choose the axis limits and appearance.
bar(*args, **kwargs) Draw a bar graph.
blue_to_yellow([m])
bone([m]) Gray-scale with a tinge of blue color map.
box(*args) Display a box around the boundaries of the current axis.
brighten(*args) Brighten or darken color map.
camdolly(*args) Dolly camera.
camlight(*args, **kwargs) Create or set position of a light.
camlookat(*args) Move camera and target to view specified objects.
campos(*args) Camera position.
camproj(*args) Camera projection.
camroll(*args) Roll camera.
camtarget(*args) Camera target.
camup(*args) Camera up vector.
camva(*args) Camera view angle.
camzoom(*args) Zoom camera.
caxis(*args) Set the limits for the color axis.
cla(*args) Clear the current axis.
clabel(*args) Control labeling of contours.
clf() Clear current figure.
close(*args) Close figure.
closefig(num) Close figure window with number ‘num’.
closefigs() Close all figure windows.
colorbar(*args) Display a color bar.
colorcube([m]) Enhanced color-cube color map.
colormap(*args) Specify colormap.
coneplot(*args, **kwargs) Draw a 3D cone plot.
contour(*args, **kwargs) Draw a 2D contour plot.
contour3(*args, **kwargs) Draw 3D contour plot.
contourf(*args, **kwargs) Draw filled contour plot.
contourslice(*args, **kwargs) Draw contour lines in slice planes.
cool([m]) Shades of cyan and magenta color map.
copper([m]) Linear copper-tone color map.
daspect(*args) Change the data aspect ratio.
figure(*args, **kwargs) Extension of BaseClass.figure
fill(*args, **kwargs) Draw filled 2D polygons.
fill3() Draw filled 3D polygons.
flag([m]) Alternating red, white, blue, and black color map.
gca() Return the current axis in the current figure.
gcf() Return current figure.
getp(*args) Get object properties or an attribute in this backend instance.
gray([m])
grid(*args) Toggle the display of grid lines.
hardcopy([filename, quality, progressive, ...]) Save a hardcopy of the current figure to file (with the given filename).
hidden(*args) Toggle hidden line removal in the current axis.
hold(*args) Change the hold state of the current axis.
hot([m])
hsv([m])
init()
ishold() Return the hold state (True if hold is on, and False if it is off).
isocaps(*args, **kwargs) Draw isosurface end caps.
isosurface(*args, **kwargs) Draw isosurfaces from 3D scalar fields.
jet([m])
legend(*args, **kwargs) Add legend(s) to the current plot.
light(**kwargs) Add a light to the current axis.
lines([m]) Color map with the line colors.
loglog(*args, **kwargs) Draw a loglog plot with logarithmic scaling on x- and y-axis.
material(*args) Set the material reflectance mode.
mesh(*args, **kwargs) Draw a 3D mesh surface.
meshc(*args, **kwargs) Draw a mesh with a contour plot beneath.
openfig([filename]) Load figures saved in a file (with the given filename).
pcolor(*args, **kwargs) Draw a 2D pseudocolor plot.
pink([m]) Pastel shades of pink color map.
plot(*args, **kwargs) Draw line and scatter plots.
plot3(*args, **kwargs) Draw lines and points in 3D space.
prism([m]) Prism color map.
quiver(*args, **kwargs) Draw arrows from a 2D vector field.
quiver3(*args, **kwargs) Draw velocity vectors in 3D space.
savefig([filename]) Save all current figures to a file (with the given filename).
semilogx(*args, **kwargs) Draw a semilog plot with logarithmic scaling on x-axis.
semilogy(*args, **kwargs) Draw a semilog plot with logarithmic scaling on y-axis.
setp(*args, **kwargs) Set object properties or attributes in this backend instance.
shading(*args) Control the color shading of surfaces.
show() Redraw the current figure.
slice_(*args, **kwargs) Draw volumetric slice plot.
spring([m])
stem(*args, **kwargs) Draw a stem plot.
streamline(*args, **kwargs) Draw streamlines from 2D or 3D vector data.
streamribbon(*args, **kwargs) Draw stream ribbons from 3D vector data.
streamslice(*args, **kwargs) Draw streamlines in axis aligned slice planes.
streamtube(*args, **kwargs) Draw stream tubes from 3D vector data.
subplot(*args, **kwargs) Create axes in tiled positions.
summer([m])
surf(*args, **kwargs) Draw a 3D solid surface.
surfc(*args, **kwargs) Draw a solid surface with contours beneath.
surfl(*args, **kwargs) 3D shaded surface with lighting.
title(*args) Add title to the current plot.
vga([m]) Windows colormap for 16 colors.
view(*args) Specify viewpoint.
white([m]) All white color map.
winter([m])
xlabel(*args) Add a label to the x-axis.
xlim(*args) Set or get limits on x axis.
ylabel(*args) Add a label to the y-axis.
ylim(*args) Set or get limits on y axis.
zlabel(*args) Add a label to the z-axis.
zlim(*args) Set or get limits on z axis.
__class__

alias of type

__delattr__

x.__delattr__(‘name’) <==> del x.name

__dict__ = dict_proxy({'_setup_axis': <function _setup_axis at 0xa7e37d0>, '__module__': 'scitools.easyviz.vtk_', '_add_legend': <function _add_legend at 0xa7e35f0>, '_set_title': <function _set_title at 0xa7e3b18>, '_cut_data': <function _cut_data at 0xa7e3230>, 'figure': <function figure at 0xa7e3488>, 'summer': <function summer at 0xb03c578>, '_set_lights': <function _set_lights at 0xa7e39b0>, 'spring': <function spring at 0xace20c8>, '_fix_latex': <function _fix_latex at 0xa7e3050>, '_set_colormap': <function _set_colormap at 0xa7e3758>, '_set_grid': <function _set_grid at 0xa7e3500>, '_add_streams': <function _add_streams at 0xa7e38c0>, 'autumn': <function autumn at 0xb03c6e0>, '_get_3d_structured_grid': <function _get_3d_structured_grid at 0xa7e3e60>, '_set_view_old': <function _set_view_old at 0xa7e1c08>, '_add_surface': <function _add_surface at 0xa7e3f50>, 'blue_to_yellow': <function blue_to_yellow at 0xace2140>, '_set_shading': <function _set_shading at 0xa7e30c8>, 'winter': <function winter at 0xb03c668>, 'jet': <function jet at 0x9446f50>, '_create_Tk_gui': <function _create_Tk_gui at 0xa7e1c80>, '_replot': <function _replot at 0xa7e3938>, 'brighten': <function brighten at 0x9446de8>, '_set_legends': <function _set_legends at 0xa7e3cf8>, 'init': <function init at 0xa7e1b90>, '__init__': <function __init__ at 0xa7e1b18>, '_add_velocity_vectors': <function _add_velocity_vectors at 0xa7e32a8>, '_create_labeled_axes': <function _create_labeled_axes at 0xa7e1de8>, '_add_line': <function _add_line at 0xa7e3320>, '_set_actor_properties': <function _set_actor_properties at 0xa7e3b90>, '__doc__': 'Backend using VTK.', '_create_vtk_data': <function _create_vtk_data at 0xa7e3a28>, '_add_contours': <function _add_contours at 0xa7e3140>, '_add_isosurface': <function _add_isosurface at 0xa7e3c08>, '_set_colorbar': <function _set_colorbar at 0xa7e3848>, 'hardcopy': <function hardcopy at 0x9446aa0>, 'closefig': <function closefig at 0x9446c08>, 'hsv': <function hsv at 0x9446488>, '_data_inside_bounds': <function _data_inside_bounds at 0xa7e31b8>, '_update_camera': <function _update_camera at 0xa7e1758>, '_set_view': <function _set_view at 0xa7e1ed8>, 'gray': <function gray at 0x9446668>, '_add_slices': <function _add_slices at 0xa7e3578>, 'flag': <function flag at 0x9446b90>, 'hot': <function hot at 0x94465f0>, '_get_2d_structured_grid': <function _get_2d_structured_grid at 0xa7e3398>, '_initialize_camera': <function _initialize_camera at 0xa7e1cf8>, 'closefigs': <function closefigs at 0x9446ed8>, 'clf': <function clf at 0xa7e3668>, '_set_caxis': <function _set_caxis at 0xa7e3c80>, '_set_box_state': <function _set_box_state at 0xa7e3410>})
__format__()

default object formatter

__getattribute__

x.__getattribute__(‘name’) <==> x.name

__hash__() <==> hash(x)
__init__()[source]
__module__ = 'scitools.easyviz.vtk_'
static __new__(S, ...) → a new object with type S, a subtype of T
__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__() <==> repr(x)
__setattr__

x.__setattr__(‘name’, value) <==> x.name = value

__sizeof__() → int

size of object in memory, in bytes

__str__()
static __subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

autumn(m=256)[source]
axes(*args, **kwargs)

Create axes in specified positions.

Calling:

axes()

returns a default Axis instance.

Calling:

axes(ax)

sets the axis in the Axis instance ax as the current axis.

Calling:

axes(viewport=RECT)

returns a axis at the position given in RECT. RECT is normally a list [left,bottom,width,height], where the four parameters (values between 0 and 1) specifies the location and size of the axis box ((0,0) is the lower-left corner and (1,1) is the upper-right corner). However, this is backend-dependent.

axis(*args, **kwargs)

Choose the axis limits and appearance.

Calling:

axis([xmin, xmax, ymin, ymax[, zmin, zmax]])

sets the limits on the x-, y-, and z-axes in the current plot.

Calling:

axis(xmin, xmax, ymin, ymax[, zmin, zmax])

gives the same result as above.

Calling:

axis()

returns the limits on the x-, y-, and z-axes for the current plot. If the view in the current plot is a 2D view, only the limits on the x- and y-axis are returned.

Calling:

axis(mode)

sets axis scaling to mode, where mode can be

  • ‘auto’ - autoscaling is used
  • ‘manual’ - freeze the scaling at the current limits
  • ‘tight’ - sets the axis limits to the range of the data
  • ‘fill’ - has currently no affect

Calling:

axis(method)

sets the appearance of the current axis as specified by method.

Legal values for method are:
  • ‘equal’, ‘image’, ‘normal’, ‘square’, ‘vis3d’

Calling:

axis(direction)

sets the direction of the increasing values on the axes.

  • ‘ij’ - reverse y-axis
  • ‘xy’ - restore y-axis

Calling:

axis('off')

turns off the visibility of the axis.

Calling:

axis('on')

turns the visibility of the axis back on.

Calling:

axis(ax, ...)

affects the Axis object ax instead of the current axis.

bar(*args, **kwargs)

Draw a bar graph.

Calling:

bar(data)

where data is a dictionary on the form

data = {‘method1’: {‘thing1’: value, ‘thing2’: value},
‘method2’: {‘thing1’: value, ‘thing2’: value}, ‘method3’: {‘thing1’: value, ‘thing2’: value},}

will draw m bars for every name (key in data), one for each key in data[name], where the height indicates the value. The name is placed beneath each of the bar groups on the x axis.

Calling:

bar(Y)

will draw a bar for each of the elements in the vector/matrix Y. If Y is a matrix, a group of bars from the elements of each row of Y will be created.

Calling:

bar(x,Y)

is the same as above only that the values on the x axis is defined by the vector x.

Calling:

bar(..., width)

uses the specified width on the bars. The default width is 0.8, while a width of 1.0 should make the bars just touch each other (might vary in the different backends).

Calling:

bar(..., color)

uses the given color for all the bars.

Calling:

bar(ax, ...)

uses the Axis object ax instead of the current axis.

@return: A Bars object.

Examples:

>>> from numpy.random import rand
>>> bar(rand(4))
>>> figure()
>>> bar(rand(4,3))
blue_to_yellow(m=200)[source]
bone(m=None)

Gray-scale with a tinge of blue color map.

box(*args)

Display a box around the boundaries of the current axis.

Calling:

box('on')

displays a box at the boundaries of the current axis.

Calling:

box('off')

turns off the box.

Calling:

box()

toggles the display of a box in the current axis.

Calling:

box(ax, ...)

uses the Axis object ax instead of the current axis.

Note: box(True) and box(False) is the same as box(‘on’) and box(‘off’), respectively.

brighten(*args)[source]

Brighten or darken color map.

camdolly(*args)

Dolly camera.

Calling:

camdolly(dx, dy, dz)

moves the camera position along the direction of projection.

Calling:

camdolly(ax, ...)

uses the Axis object ax instead of the current axis.

camlight(*args, **kwargs)

Create or set position of a light.

Calling:

camlight('headlight')

creates a light in the current axis at the position of the camera.

Calling:

camlight('right')

creates a light right and up from the camera in the current axis.

Calling:

camlight('left')

creates a light left and up from the camera.

Calling:

camlight()

is the same as camlight(‘right’).

Calling:

camlight(azimuth, elevation)

creates a light at azimuth, elevation (both given in degrees) from the camera.

Calling:

camlight(..., style)

sets the style of the light, where style can be either ‘local’ (default) or ‘inifinite’.

Calling:

camlight(l, ...)

places Light object l at the specified position.

@return: A Light object.

camlookat(*args)

Move camera and target to view specified objects.

Calling:

camlookat(obj)

views the PlotProperties object obj.

Calling:

camlookat(ax)

views the objects in the Axis object ax.

Calling:

camlookat()

views the objects in the current axes.

campos(*args)

Camera position.

Calling:

campos()

returns the position of the camera in the current axis.

Calling:

campos([x,y,z])

sets the camera position.

Calling:

campos(x,y,z)

is the same as above.

Calling:

campos(ax, ...)

sets or gets the position of the camera in the Axis object ax instead of the current axis.

camproj(*args)

Camera projection.

Calling:

camproj()

returns the camera projection of the current axis.

Calling:

camproj(projeciton)

sets the projection of the camera to projection, where projection can be either ‘orthographic’ (default) or ‘perspective’.

Calling:

camproj(ax, ...)

sets or gets the camera projection of the Axis object ax instead of the current axis.

camroll(*args)

Roll camera.

Calling:

camroll(angle)

rotates the camera about the direction of projection.

Calling:

camroll(ax, ...)

rotates the camera in the Axis object ax instead of the current axis.

camtarget(*args)

Camera target.

Calling:

camtarget()

returns the camera target of the current axis.

Calling:

camtarget([x,y,z])

sets the target for the camera.

Calling:

camtarget(x,y,z)

is the same as above.

Calling:

camtarget(ax, ...)

sets or gets the camera target in the Axis object ax instead of the current axis..

camup(*args)

Camera up vector.

Calling:

camup()

returns the up vector of the camera in the current axis.

Calling:

camup([x, y, z])

sets the camera up vector.

Calling:

camup(x, y, z)

is the same as the above.

Calling:

camup(ax, ...)

sets or gets the up vector for the camera in the Axis object ax instead of the current axis.

camva(*args)

Camera view angle.

Calling:

camva()

returns the camera view angle of the current axis.

Calling:

camva(angle)

sets the camera view angle.

Calling:

camva(ax, ...)

sets or gets the camera view angle in the Axis object ax instead of the current axis.

camzoom(*args)

Zoom camera.

Calling:

camzoom(factor)

zooms the camera the specified factor. A value greater than 1 is a zoom-in, while a value less than 1 is a zoom-out.

Calling:

camzoom(ax, ...)

zooms the camera in the Axis object ax instead of the current axis.

caxis(*args)

Set the limits for the color axis.

Calling:

caxis([cmin, cmax])

changes the limits for the color axis to range from cmin to cmax.

Calling:

caxis(cmin, cmax)

gives the same result as above.

Calling:

caxis('manual')

freezes the limits at the current range.

Calling:

caxis('auto')

uses autoranging for the color axis limits (default).

Calling:

cmin, cmax = caxis()

returns the current color axis limits.

Calling:

caxis(ax, ...)

uses the Axis object ax instead of the current axis.

cla(*args)

Clear the current axis.

Calling:

cla()

clears the current axis.

Calling:

cla(ax)

clears the Axis object ax instead of the current axis.

clabel(*args)

Control labeling of contours.

Calling:

clabel(obj, 'on')

adds height labels to a contour plot (obj must be a Contours object).

Calling:

clabel(obj, 'off')

removes the labeling of the contour lines (default).

clf()[source]

Clear current figure.

close(*args)

Close figure.

Calling:

close()

closes the current figure.

Calling:

close(num)

closes the figure with number num.

Calling:

close(fig)

closes the Figure object fig.

Calling:

close('all')

closes all figures.

closefig(num)[source]

Close figure window with number ‘num’.

closefigs()[source]

Close all figure windows.

colorbar(*args)

Display a color bar.

Calling:

colorbar()

displays a colorbar in the current axis.

Calling:

colorbar('off')

removes the colorbar from the current axis.

Calling:

colorbar(loc)

displays a colorbar in the current axis at the location specified by loc, where loc may be any of the following:

  • ‘North’ - inside plot box near top
  • ‘South’ - inside bottom
  • ‘East’ - inside right
  • ‘West’ - inside left
  • ‘NorthOutside’ - outside plot box near top
  • ‘SouthOutside’ - outside bottom
  • ‘EastOutside’ - outside right
  • ‘WestOutside’ - outside left

Calling:

colorbar(ax, ...)

uses the Axis object ax instead of the current axis.

@return: A Colorbar object.

colorcube(m=None)

Enhanced color-cube color map.

colormap(*args)

Specify colormap.

Calling:

colormap(map)

uses the colormap in map as the current colormap (map is dependent on the current backend).

Calling:

colormap('default')

sets the colormap to the default colormap, i.e., jet.

Calling:

map = colormap()

returns the current colormap.

Calling:

colormap(ax, ...)

uses the figure corresponding to the Axis object ax instead of the current figure.

coneplot(*args, **kwargs)

Draw a 3D cone plot.

Calling:

coneplot(X,Y,Z,U,V,W,Cx,Cy,Cz)

draws velocity vectors as cones from the 3D vector field defined by U, V, and W at the points given in the arrays Cx, Cy, and Cz. The arrays X, Y, and Z defines the grid coordinates for vector field. The shape of U, V, and W is assumed to be the same, while the grid components must either have the same shape as U or fulfill the requirement len(X)==n, len(Y)==m, and len(Z)==p, where m,n,p=shape(U).

Calling:

coneplot(U,V,W,Cx,Cy,Cz)

is the same as above, but it is assumed that X,Y,Z = meshgrid(range(n),range(m),range(p)), where m,n,p = shape(U).

Calling:

coneplot(..., scale)

will automatically scale the cones by the factor scale (default is 1). To turn of automatic scaling, use a scale value of 0.

Calling:

coneplot(..., C)

uses the colors in the array C to color the cones (C must have the same shape as U).

Calling:

coneplot(..., 'quiver')

will plot arrows instead of cones.

Calling:

coneplot(ax, ...)

uses the Axis object ax instead of the current axis.

@return: A Streams object.

Examples:

FIXME: Add conplot example.

contour(*args, **kwargs)

Draw a 2D contour plot.

Calling:

contour(X, Y, Z)

displays a contour plot where the values in the scalar field Z are treated as heights above a plane. The grid components X and Y must either have the same shape as Z or fulfill the requirement len(X)==n and len(Y)==m, where m,n=shape(Z).

Calling:

contour(Z)

is the same as calling contour(range(n),range(m),Z), where m,n=shape(Z).

Calling:

contour(..., n)

displays a contour plot with n contour lines (default is 8 lines).

Calling:

contour(..., v)

displays contours at levels given in the array v.

Calling:

contour(..., fmt)

uses the color and line style as given in the format string fmt to draw the contour lines (see the plot command for further details on format strings). This overrides the default behavior of using the current colormap to color the contour lines.

Calling:

contours(ax, ...)

plots into the Axis object ax instead of the current axis.

Calling:

contour(...,clabels='on')

is the same as calling h=contour(...) followed by clabel(h,’on’).

Examples:

>>> # draw a contour plot of the peaks function:
>>> x = y = linspace(-3, 3, 13)
>>> xv, yv = meshgrid(x, y)
>>> values = peaks(xv, yv)
>>> contour(xv, yv, values)

Draw 10 red contour lines with double line width: >>> contour(xv, yv, values, 10, ‘r’, linewidth=2)

Draw contour lines at -2, 0, 2, and 5: >>> contour(xv, yv, values, [-2,0,2,5])

contour3(*args, **kwargs)

Draw 3D contour plot.

Calling:

contour3(...)

is the same as calling contour(...), except that the contours are drawn at their coresponding height level.

Examples:

>>> contour3(peaks())
contourf(*args, **kwargs)

Draw filled contour plot.

Calling:

contourf(...)

is the same as calling contour(...) with the exception that the space between the contour lines is filled with colors.

Examples:

>>> contourf(peaks(), clabel='on', colorbar='on')
contourslice(*args, **kwargs)

Draw contour lines in slice planes.

Calling:

contourslice(X,Y,Z,V,Sx,Sy,Sz)

will draw contour lines in planes aligned with the coordinate axes at the points in the arrays Sx, Sy, and Sz. The arrays X, Y, and Z defines the grid coordinates for the volume V and they must either have the same shape as V or fulfill the requirement len(X)==n, len(Y)==m, and len(Z)==p, where m,n,p = shape(V).

Calling:

contourslice(V,Sx,Sy,Sz)

is the same as above, but it is assumed that X,Y,Z = meshgrid(range(n),range(m),range(p)), where m,n,p = shape(V).

Calling:

contourslice(X,Y,Z,V,XI,YI,ZI)

will draw contour lines through the volume V along the surface given in the arrays XI, YI, and ZI.

Calling:

contourslice(V,XI,YI,ZI)

is the same as above, but it is assumed that X,Y,Z = meshgrid(range(n),range(m),range(p)), where m,n,p = shape(V).

Calling:

contourslice(..., n)

will draw n contour lines per plane instead of the default of five contour lines.

Calling:

contourslice(..., v)

will draw contour lines at the levels given in the array v.

Calling:

contourslice(ax, ...)

uses the Axis object ax instead of the current axis.

@return: A Volume object.

Example: >>> xx, yy, zz = meshgrid(linspace(-2,2,21), linspace(-2,2,17), ... linspace(-2,2,25)) >>> vv = xx*exp(-xx**2-yy**2-zz**2) >>> contourslice(xx, yy, zz, vv, [-.7,.7], [], [0], view=3)

cool(m=None)

Shades of cyan and magenta color map.

copper(m=None)

Linear copper-tone color map.

daspect(*args)

Change the data aspect ratio.

Calling:

daspect([x,y,z])

sets the data aspect ratio for the x, y, and z axis (e.g., daspect([1,2,4]) means that one unit in x direction is equal in length to two units in y direction and four units in z direction). For example, daspect([r,1,1]) makes the physical size of the y axis in the plot r times the x axis.

The size of the axes must be explicitly in order for the daspect command to work properly. Note that setting the aspect ratio is not supported by all backends.

Calling:

daspect()

returns the data aspect ratio for the current axis.

Calling:

daspect(mode)

sets the data aspect ratio mode, where mode can be ‘auto’, ‘equal’, or ‘manual’. By specifying the mode to ‘auto’ (default), the data aspect ratio will be automatically computed so that each axis spans the available space in the figure window. In the ‘manual’ mode the user sets the aspect ratio, while ‘equal’ means that the the same units are used in both axes (for example, if the x axis goes from 0 to 10 and the y axis from 0 to 1, and we want the x axis ten times as long as the y axis, the manual aspect ratio er 0.1, and ‘equal’ will automatically set the ratio to 0.1).

Calling:

daspect('mode')

returns the data aspect ratio mode.

Calling:

daspect(r)

sets the data aspect ratio to r. This is for backends that do not support setting individual aspect ratios for the x, y, and z axis (like the Gnuplot backend). If the backend do support individual aspect ratios, the aspect ratio is set to r for all three axes.

Calling:

daspect(ax, ...)

uses the the Axis object ax instead of the current axis.

>>> surf(peaks(21))
<scitools.easyviz.common.Surface object at 0xb7d7950c>
>>> daspect()
(1.0, 1.0, 0.71549553759291729)
>>> figure()
>>> surf(peaks(21))
<scitools.easyviz.common.Surface object at 0xb58ff70c>
>>> daspect([1,1,1])
>>>
figure(*args, **kwargs)[source]

Extension of BaseClass.figure

fill(*args, **kwargs)

Draw filled 2D polygons.

fill3()

Draw filled 3D polygons.

flag(m=64)[source]

Alternating red, white, blue, and black color map.

  • flag(m) ‘m’ must be a multiple of 4
gca()

Return the current axis in the current figure.

gcf()

Return current figure.

getp(*args)

Get object properties or an attribute in this backend instance.

Calling:

getp('name')

returns the attribute with name ‘name’ in this backend instance.

Calling:

getp(obj, 'name')

returns the property with name ‘name’ of the object given in obj. This object must have a get method (like Figure, Axis, or PlotProperties objects).

Calling:

getp(obj)

displays all property names and values for the object given in obj.

gray(m=256)[source]
grid(*args)

Toggle the display of grid lines.

Calling:

grid('on')

displays grid lines in the current axis.

Calling:

grid('off')

removes the grid lines from the current axis.

Calling:

grid()

toggles the display of grid lines in the current axis.

Calling:

grid(ax, ...)

uses Axis object ax instead of the current axis.

Note that calling grid(True) and grid(False) is the same as calling grid(‘on’) and grid(‘off’), respectively.

hardcopy(filename='', quality=100, progressive=False, vector_file=True, landscape=False, raster3d=False, compress=False, **kwargs)[source]

Save a hardcopy of the current figure to file (with the given filename). The file format (image type) is determined from the extension of the filename. If any changes have been made by working directly on the backend instance, set the keyword argument replot to False to stop Easyviz from replotting the current figure and destroying those changes. The figure can be stored in either a vector PostScript (PS/EPS) or PDF file using GL2PS or a image file (PNG/PNM/JPEG/TIFF/BMP) using a corresponding vtkWriter instance. PostScript output can also be generated using vtkPostScriptWriter if vector_file is set to False. TeX output is also available, but only the text output will be saved to the file.

If the given filename has no extension, then EPS output will be used.

Keyword arguments:

quality – Sets the quality of the resulting image. Affects only
JPEG images. Given as an integer between 0 and 100 where 100 results in the best quality (but also the largest file). The default is quality=100.
progressive – Sets whether to use progressive JPEG generation or
not. Defaults to False.
vector_file – If True (default), the figure will be stored as a
vector file. This is only true if either PS, EPS, or PDF are choosen as the output file format.

Additional keyword arguments (only in affect if the vector_file argument is set to True and the file format is either PS, EPS or PDF):

landscape – Sets whether to use landscape or portrait orientation.
A True value result in landscape orientation. Defaults to False.
raster3d – If True, this will write 3D props as raster images
while 2D props are rendered using vector graphic primitives. Defaults to False.
compress – Compression when generating PostScript or PDF output.
The default is False (no compression).
hidden(*args)

Toggle hidden line removal in the current axis.

Calling:

hidden(state)

turns hidden line removal on if state is ‘on’ (or True) and off if state is ‘off’ (or False). Hidden line removal is turned on by default.

Calling:

hidden()

toggles the hidden state.

Note: Some backends has no support for hidden line removal (e.g., VTK).

hold(*args)

Change the hold state of the current axis.

Calling:

hold('on')

makes every subsequent plotting commands be added to the current plot.

Calling:

hold('off')

clears the previous plot before the new plot is drawn. This is the default behavior.

Calling:

hold()

toggles the hold state in the current axis.

Calling:

hold(ax, ...)

affects the Axis object ax instead of the current axis.

Note that one can use hold(True) and hold(False) instead of hold(‘on’) and hold(‘off’), respectively.

hot(m=256)[source]
hsv(m=256)[source]
init()[source]
ishold()

Return the hold state (True if hold is on, and False if it is off).

isocaps(*args, **kwargs)

Draw isosurface end caps.

isosurface(*args, **kwargs)

Draw isosurfaces from 3D scalar fields.

Calling:

isosurface(X,Y,Z,V,isovalue)

creates an isosurface for the volume V at the iso value given by isovalue. The arrays X, Y, and Z defines the grid for the volume V and they must either have the same shape as V or fulfill the requirement len(X)==n, len(Y)==m, and len(Z)==p, where m,n,p = shape(V).

Calling:

isosurface(V,isovalue)

is the same as above, but it is assumed that X,Y,Z = meshgrid(range(n),range(m),range(p)), where m,n,p = shape(V).

Calling:

isosurface(..., C)

uses the colors in the array C instead of the colors in the scalar field V (C and V must have the same shape).

@return: A Volume object.

Examples:

>>> x, y, z, v = flow()
>>> isosurface(x, y, z, v, -3, daspect=[1,1,1])
jet(m=256)[source]
legend(*args, **kwargs)

Add legend(s) to the current plot.

Calling:

legend(string1, string2, string3,...)
or
legend([string1, string2, string3,...])

adds legends to the current plot using the given strings as labels. Note that the number of strings should match the number of items in the current axis (i.e., getp(gca(), ‘numberofitems’)), but a less legends than curve items are allowed.xo

Calling:

legend(string)

adds the given string as a legend to the last item added to the current axis.

Calling:

legend(ax, ...)

affects the Axis object ax instead of the current axis.

The keyword arguments (**kwargs) are ignored, but makes it possible to seemlessly switch between easyviz and matplotlib.

light(**kwargs)

Add a light to the current axis.

Calling:

light()

will add a light to the current axis with default values for all light properties.

Calling:

light(prop1=value1, prop2=value2, ...)

adds a light with properties as given in the keyword arguments.

@return: A Light object.

lines(m=None)

Color map with the line colors.

loglog(*args, **kwargs)

Draw a loglog plot with logarithmic scaling on x- and y-axis.

Calling:

loglog(...)

is the same as calling plot(...) with the exception that a logarithmic (base 10) scale is used for both x- and y-axes.

material(*args)

Set the material reflectance mode.

Calling:

material([ka, kd, ks[, n[, sc]]])

changes the ambient/diffuse/specular strength, specular exponent, and specular color reflectance of objects.

Calling:

material(ka, kd, ks[, n[, sc]])

is the same as above.

Calling:

material(mode)

sets the material mode, where mode can be one of the following strings:

  • ‘shiny’ - shiny objects
  • ‘dull’, - dull objects
  • ‘metal’ - metallic objects
  • ‘default’ - default material properties
mesh(*args, **kwargs)

Draw a 3D mesh surface.

Calling:

mesh(X, Y, Z[, C])

plots the colored mesh defined by scalar field Z defined on the grid given by X and Y. The grid components X and Y must either have the same shape as Z or fulfill the requirement len(X)==n and len(Y)==m, where m,n=shape(Z). The color is determined by the array C which must have the same shape as Z. If the color array C is not given, Z is used as the color array (i.e., C=Z).

Calling:

mesh(Z[, C])

is the same as calling mesh(range(n), range(m), Z[, C]), where m,n = shape(Z).

Calling:

mesh(ax, ...)

plots into the Axis object ax instead of the current axis.

@return: A Surface object.

Examples:

>>> x = y = linspace(-2, 2, 21)
>>> xx, yy = meshgrid(x, y)
>>> zz = exp(-xx**2)*exp(-yy**2)
>>> mesh(xx, yy, zz)
meshc(*args, **kwargs)

Draw a mesh with a contour plot beneath.

Calling:

meshc(...)

is the same as calling mesh(...) only that a contour plot is drawn beneath the mesh.

Examples:

Draw a mesh with contour lines: >>> x = linspace(-2, 2, 21) >>> xx, yy = meshgrid(x) >>> zz = peaks(xx, yy) >>> meshc(xx, yy, zz)

Draw a mesh with 20 contour lines: >>> meshc(xx, yy, zz, clevels=20)

Draw a mesh with contour lines at height -0.2, -0.5, 0.2, 0.5: >>> meshc(xx, yy, zz, cvector=[-0.2,-0.5,0.2,0.5])

Draw a mesh with contours and label the contours: >>> meshc(xx, yy, zz, clabels=’on’)

openfig(filename='figspickle.txt')

Load figures saved in a file (with the given filename). The format of this file is currently standard Python pickle format. All figures in a previous session were dumped to the file, and all these figures are by this method reloaded and added to the current set of figures.

pcolor(*args, **kwargs)

Draw a 2D pseudocolor plot.

Calling:

pcolor(C)

draw a pseudocolor plot of the 2D array C.

Calling:

pcolor(X,Y,C)

same as above, only that the grid is specified by the X and Y arrays. These arrays must either have the same shape as C or fulfill the requirement len(X)==n and len(Y)==m, where m,n=shape(C).

Calling:

pcolor(ax, ...)

uses the Axis object ax instead of the current axis.

Examples:

Simple pseudocolor plot: >>> pcolor(peaks(31))

Draw a pseudocolor plot with interpolated shading: >>> pcolor(peaks(), shading=’interp’, ... colorbar=’on’, colormap=hot())

pink(m=None)

Pastel shades of pink color map.

plot(*args, **kwargs)

Draw line and scatter plots.

Calling:

plot(x, y)

plots y against x, i.e., if x and y are vectors of length n, then this will plot all the points (x[i], y[i]) for 0<=i<n.

Calling:

plot(y)

plots values in y on y-axis (same as plot(range(len(y)),y)).

Calling:

plot(y, fmt)

plots values in y on y-axis formated like fmt (see below).

Calling:

plot(x1,y1,fmt1, x2,y2,fmt2, ...)

same as hold(‘on’) followed by multiple plot(x,y,fmt).

Calling:

plot(x1,y1,x2,y2,...)

like above, but automatically chooses different colors.

Calling:

plot(y1,y2,...,x=x)

uses x as the x values for all the supplied curves. x=’auto’ has the same effect as x=range(len(y1)).

Calling:

plot(...,log=mode)

uses logarithmic (base 10) scales on either the x- or y-axes (or both). mode can be

  • ‘x’ - logarithmic scale on x-axis
  • ‘y’ - logarithmic scale on y-axis
  • ‘xy’ - logarithmic scales on both x- and y-axes.

Calling:

plot(ax, ...)

plots into the Axis object ax instead of the current axis.

The plot command returns a list a of all Line objects created.

The following format specifiers exist:

y yellow . point - solid m magenta o circle : dotted c cyan x x-mark -. dashdot r red + plus – dashed g green * star b blue s square w white d diamond k black v triangle (down)

^ triangle (up) < triangle (left) > triangle (right) p pentagram h hexagram

Examples:

Draw a line from a Python list: >>> plot([1,2,3])

Draw three red crosses: >>> plot([1,2,3], ‘rx’)

A somewhat more complex example: >>> x = linspace(0, 15, 76) # 0, 0.2, 0.4, ..., 15 >>> y1 = sin(x)*x >>> y2 = sin(x)*sqrt(x) >>> plot(x, y1, ‘b-‘, x, y2, ‘ro’, ... legend=(‘x*sin(x)’, ‘sqrt(x)*sin(x)’))

Note: loglog, semilogy, and semilogx are like plot(...,log=’xy’), plot(...,log=’y’), and plot(...,log=’x’), respectively.

plot3(*args, **kwargs)

Draw lines and points in 3D space.

Calling:

plot3(x, y, z)

plots z against x and y, i.e., if x, y, and z are vectors of length n, then this will plot all the points (x[i], y[i], z[i]) for 0<=i<n.

Calling:

plot3(z)

plots values in z on the z-axis (same as plot3(range(len(z)), range(len(z)), z)).

Calling:

plot3(z, fmt)

plots values in z on z-axis formated like fmt (see the plot command).

Calling:

plot3(x1,y1,z1,fmt1,x2,y2,z2,fmt2,...)

same as hold(‘on’) followed by multiple plot3(x,y,z,fmt).

Calling:

plot3(x1,y1,z1,x2,y2,z2,...)

like above, but automatically chooses different colors.

Calling:

plot3(z1,z2,...,x=x,y=y)

uses x as the values on the x-axis and y as the values on the y-axis for all the supplied curves (assuming that all have the same length). By setting x=’auto’ and y=’auto’ has the same effect as x=range(len(z1)) and y=range(len(z1)), respectively.

Calling:

plot3(ax, ...)

plots into the Axis object ax instead of the current axis.

The plot3 command returns a list containing all the created Line objects.

Examples:

>>> t = linspace(0,10*pi,301)
>>> plot3(sin(t), cos(t), t, title='A helix', grid='on')
prism(m=None)

Prism color map.

quiver(*args, **kwargs)

Draw arrows from a 2D vector field.

Calling:

quiver(X, Y, U, V)

displays vectors as arrows with components U and V at the grid defined by X and Y. The arrays U and V must both have the same shape and the grid components X and Y must either have the same shape as U or fulfill the requirement len(X)==n and len(y)==m, where m,n=shape(u).

Calling:

quiver(U, V)

is the same as calling quiver(range(n),range(m),U,V), where m,n=shape(u)).

Calling:

quiver(..., 'filled')

draw filled arrows.

Calling:

quiver(..., fmt)

sets the line specification as given in the format string fmt. See the plot command for further details on specifying the format string.

Examples:

Plot the gradient field of the function z = x**2 + y**2: >>> x = y = linspace(-2, 2, 21) >>> xv, yv = meshgrid(x,y) >>> values = xv**2 + yv**2 >>> contour(xv, yv, values, 10, hold=’on’) <scitools.easyviz.common.Contours object at 0xb45f374c> >>> uv, vv = gradient(values, 0.2) >>> quiver(xv, yv, uv, vv) <scitools.easyviz.common.VelocityVectors object at 0xb45435cc> >>> hold(‘off’)

Another example: >>> x = linspace(0,3,80) >>> y = sin(2*pi*x) >>> theta = 2*pi*x+pi/2 >>> u = sin(theta)/10 >>> v = cos(theta)/10 >>> quiver(x,y,u,v,0.04,’b’,hold=’on’) <scitools.easyviz.common.VelocityVectors object at 0xb768e1cc> >>> plot(x,y,’r’) [<scitools.easyviz.common.Line object at 0xb768e36c>] >>> hold(‘off’)

quiver3(*args, **kwargs)

Draw velocity vectors in 3D space.

Calling:

quiver3(X, Y, Z, U, V, W)

plots arrows from the 3D vector field with components U,V,W at the grid defined by X,Y,Z. The shape of the three vector components is assumed to be the same, while the grid components must either have the same shape as U or fulfill the requirements len(X)==n, len(Y)==m, and len(Z)==p, where m,n,p=shape(U).

Calling:

quiver3(Z,U,V,W)

gives the same result as above, but it is assumed that X,Y = meshgrid(range(n),range(m)), where m,n=shape(Z).

Calling:

quiver3(..., s)

scales the arrows by the scale factor given in s. The default is s=1, while a value of s=0 turns off automatic scaling.

Calling:

quiver3(..., 'filled')

fills the arrows.

Calling:

quiver3(..., fmt)

sets the specification on the arrows as given in the format string fmt (see the plot command for further information on format strings).

Calling:

quiver3(ax, ...)

plots the vectors in the Axis object ax instead of the current axis.

@return: A VelocityVectors object.

Examples:

Draw the “radius vector field” v = (x,y,z): >>> x = y = linspace(-3,3,4) >>> xv, yv, zv = meshgrid(x, y, sparse=False) >>> yv, vv, wv = xv, yv, zv >>> quiver3(xv, yv, zv, uv, uv, wv, ‘filled’, ‘r’, ... axis=[-7,7,-7,7,-7,7])

Draw the path of a projectile as a function of time: FIXME: This example is taken from ... >>> vz = 10 # Velocity >>> a = -32 # Acceleration >>> t = linspace(0,1,11) >>> z = vz*t + 1./2*a*t**2 >>> vx = 2 >>> x = vx*t >>> vy = 3 >>> y = vy*t >>> u = gradient(x) >>> v = gradient(y) >>> w = gradient(z) >>> scale = 0 >>> quiver3(x,y,z,u,v,w,0,view=[70,18],grid=’on’, ... axis=[0,3.5,0,3,-10,2])

savefig(filename='figspickle.txt')

Save all current figures to a file (with the given filename). The file has standard Python pickle format (dict of Figure instances). The figures can later be reloaded by the openfig method.

semilogx(*args, **kwargs)

Draw a semilog plot with logarithmic scaling on x-axis.

Calling:

semilogx(...)

is the same as calling plot(...) with the exception that a logarithmic (base 10) scale is used for the x-axis.

semilogy(*args, **kwargs)

Draw a semilog plot with logarithmic scaling on y-axis.

Calling:

semilogy(...)

is the same as calling plot(...) with the exception that a logarithmic (base 10) scale is used for the y-axis.

setp(*args, **kwargs)

Set object properties or attributes in this backend instance.

Calling:

setp([obj,] prop1=value1, prop2=value2, ...)

will set the attributes as given in this backend instance. If the optional positional argument obj is a given object with a set method (like Figure, Axis, and PlotProperties objects), the (relevant) properties and values are also set in this object. This also works on a list with objects.

shading(*args)

Control the color shading of surfaces.

Calling:

shading(mode)

changes the shading mode in the current axis to the one specified by by mode. Valid modes are ‘flat’, ‘interp’ (interpolated or Gouraud) and ‘faceted’ (default).

Calling:

shading(ax, ...)

uses the Axis object ax instead of the current axis.

show()

Redraw the current figure.

slice_(*args, **kwargs)

Draw volumetric slice plot.

Calling:

slice_(X,Y,Z,V,Sx,Sy,Sz)

draws orthogonal slice planes through the volumetric data set V defined on the grid with components X, Y, and Z. The grid components must either have the same shape as V or fulfill the requirement len(X)==n, len(Y)==m, and len(Z)==p, where m,n,p=shape(V). The Sx, Sy, and Sz arrays defines the slice planes in the x, y, and z direction, respectively.

Calling:

slice_(V,Sx,Sy,Sz)

is the same as calling slice_(range(n),range(m),range(p),V,Sx,Sy,Sz), where m,n,p = shape(V).

Calling:

slice_(X,Y,Z,V,XI,YI,ZI)

draws slices through the volumetric data set V along the surface defined by the arrays XI,YI,ZI.

Calling:

slice_(V,XI,YI,ZI)

is the same as calling slice_(range(n),range(m),range(p)),V,XI,YI,ZI), where m,n,p = shape(V).

Calling:

slice_(..., method)

sets which interpolation method to be used, where method can be either ‘linear’ (default), ‘cubic’, or ‘nearest’.

Calling:

slice(ax, ...)

plots into the Axis object ax instead of the current axis.

@return: A Volume object.

Examples:

Visualize the function x*exp(-x**2-y**2-z**2) over the range -2 > x,y,z < 2: >>> xx, yy, zz = meshgrid(linspace(-2,2,21), linspace(-2,2,17), ... linspace(-2,2,25)) >>> vv = x*exp(-xx**2-yy**2-zz**2) >>> slice_(xx, yy, zz, vv, [-1.2,.8,2], 2, [-2,-.2])

spring(m=256)[source]
stem(*args, **kwargs)

Draw a stem plot.

streamline(*args, **kwargs)

Draw streamlines from 2D or 3D vector data.

Calling:

streamline(X,Y,Z,U,V,W,startx,starty,startz)

will draw streamlines from the 3D vector field with components U,V,W defined on the grid given by X,Y,Z. The arrays U,V,W should all have the same shape and the grid components X,Y,Z must either have the same shape as U or fulfill the requirement len(X)==n, len(Y)==m, and len(Z)==p, where m,n,p=shape(U). The starting positions for the streamlines are defined in the arrays startx, starty, and startz.

Calling:

streamline(U,V,W,startx,starty,startz)

is the same as above, except that it is assumed that X,Y,Z = meshgrid(range(n),range(m),range(p)), where m,n,p=shape(U).

Calling:

streamline(X,Y,U,V,startx,starty)

will draw streamlines from the 2D vector field with components U,V defined on the grid given by X,Y. The arrays U,V should have the same shape and the grid componetns X,Y mist either have the same shape as U or fulfill the requirement len(X)==n and len(Y)==m, where m,n=shape(u). The starting positions for the streamlines are defined in the arrays startx and starty.

Calling:

streamline(U,V,startx,starty)

is the same as above, except that it is assumed that X,Y = meshgrid(range(n),range(m)), where m,n=shape(U).

Calling:

streamline(..., stepsize)

uses the given step size instead of the default step size of 0.1.

Calling:

streamline(ax, ...)

uses the Axis object ax instead of the current axis.

The streamline command returns a Streams object.

Examples:

FIXME: Add streamline example.

streamribbon(*args, **kwargs)

Draw stream ribbons from 3D vector data.

Calling:

streamribbon(...)

is the same as calling streamlines(...), except that only 3D vector fields are supported by the streamribbon command. The optional positional argument stepsize is not supported either.

Calling:

streamribbon(..., width)

specifies the width of the ribbons.

Examples:

FIXME: Add streamribbon example.

streamslice(*args, **kwargs)

Draw streamlines in axis aligned slice planes.

Calling:

streamslice(X,Y,Z,U,V,W,startx,starty,startz)

will draw streamlines (with direction arrows) from the 3D vector field with components U, V, and W in planes aligned with the coordinate axes at the points given in the arrays startx, starty, and startz. The arrays U, V, and W must all have the same shape and the grid coordinates given in the arrays X, Y, and Z must either have the same shape as U or fulfill the requirement len(X)==n, len(Y)==m, and len(Z)==p, where m,n,p=shape(U).

Calling:

streamslice(U,V,W,startx,starty,startz)

is the same as above, except that it is assumed that X,Y,Z = meshgrid(range(n),range(m),range(p)), where m,n,p=shape(U).

Calling:

streamslice(X,Y,U,V)

will draw streamlines from the 2D vector field with components U and V. The vector components must have equal shape and the arrays X and Y should either have the same shape as U or fulfill the requirement len(X)==n and len(Y)==m, where m,n=shape(U).

Calling:

streamslice(U,V)

is the same as above, except that it is assumed that X,Y = meshgrid(range(n),range(m)), where m,n=shape(U).

Calling:

streamslice(..., 'arrows')

will display direction arrows (default).

Calling:

streamslice(..., 'noarrows')

will not display direction arrows.

Calling:

streamslice(ax, ...)

uses the Axis object ax instead of the current axis.

@return: A ??? object.

Examples:

>>> import scipy
>>> wind = scipy.io.loadmat('wind.mat')
>>> x = wind['x']
>>> y = wind['y']
>>> z = wind['z']
>>> u = wind['u']
>>> v = wind['v']
>>> w = wind['w']
>>> streamslice(x,y,z,u,v,w,[],[],[4],daspect=[1,1,1])
streamtube(*args, **kwargs)

Draw stream tubes from 3D vector data.

Calling:

streamtube(...)

is the same as calling streamlines(...), except that only 3D vector fields are supported by the streamtube command. The optional positional argument stepsize is not supported either.

Calling:

streamtube(..., [scale, n])

will scale the width of the tubes according to scale (default is 1), while the variable n sets the number of points along the circumference of the tube (default is 20).

Examples:

FIXME: Add streamtube example.

subplot(*args, **kwargs)

Create axes in tiled positions.

Calling:

subplot(m,n,p)

splits the Figure window into m rows and n columns of small axes. The p-th axis is then selected for the current plot and the Axis object is returned.

Calling:

subplot(mnp)

is the same as calling subplot(m,n,p) as long as m<=n<=p<10.

Example:

>>> x = linspace(-5,5,101)
>>> subplot(2,1,1)
>>> plot(x,x-cos(x**2))
>>> x = logspace(-1,2)
>>> subplot(2,1,2)
>>> loglog(x,exp(x),'b-s')
summer(m=256)[source]
surf(*args, **kwargs)

Draw a 3D solid surface.

Calling:

surf(...)

is the same as calling mesh(...), except that a solid colored surface is drawn instead of a wireframe mesh.

Examples:

>>> x = linspace(-2, 2, 21)
>>> xx, yy = meshgrid(x)
>>> zz = xx**2 + yy**2
>>> surf(xx, yy, zz)
surfc(*args, **kwargs)

Draw a solid surface with contours beneath.

Calling:

surfc(...)

is the same as calling surf(...) only that a contour plot is drawn beneath the surface.

surfl(*args, **kwargs)

3D shaded surface with lighting.

title(*args)

Add title to the current plot.

Calling:

title(s)

adds the text given in s at the top of the current axis.

Calling:

title(ax, ...)

adds a title to the Axis object ax instead of the current axis.

vga(m=None)

Windows colormap for 16 colors.

view(*args)

Specify viewpoint.

Calling:

view(azimuth, elevation)

sets the viewpoint according to azimuth (horizontal rotation) and elevation (vertical). Both azimuth and elevation should be given in degrees.

Calling:

view([azimuth, elevation])

is the same as above.

Calling:

view(2)

changes the view to the default 2D view.

Calling:

view(3)

changes the view to the default 3D view.

Calling:

view(ax, ...)

uses the Axis object ax instead of the current axis.

Examples:

>>> surf(peaks())
>>> view(2)      # the default 2D view
>>> view(40,65)  # azimuth=40 and elevation=65
>>> view(3)      # back to the default 3D view
>>> surf(peaks(),view=[35,75])  # as a keyword argument
white(m=None)

All white color map.

winter(m=256)[source]
xlabel(*args)

Add a label to the x-axis.

Calling:

xlabel(s)

adds the text given in s beside the x-axis on the current axis.

Calling:

xlabel(ax, ...)

adds the label to the Axis object ax instead of the current axis.

xlim(*args)

Set or get limits on x axis.

Calling:

xlim([xmin,xmax])

sets the x limits on the current axis.

Calling:

xlim(xmin,xmax)

gives the same results as above.

Calling:

xmin, xmax = xlim()

returns the x limits for the current axis.

Calling:

xlim(ax, ...)

affects the Axis object ax instead of the current axis.

ylabel(*args)

Add a label to the y-axis.

Calling:

ylabel(s)

adds the text given in s beside the y-axis on the current axis.

Calling:

ylabel(ax, ...)

adds the label to the Axis object ax instead of the current axis.

ylim(*args)

Set or get limits on y axis.

Calling:

ylim([ymin,ymax])

sets the y limits on the current axis.

Calling:

ylim(ymin,ymax)

gives the same results as above.

Calling:

ymin, ymax = ylim()

returns the y limits for the current axis.

Calling:

ylim(ax, ...)

affects the Axis object ax instead of the current axis.

zlabel(*args)

Add a label to the z-axis.

Calling:

zlabel(s)

adds the text given in s beside the z-axis on the current axis.

Calling:

zlabel(ax, ...)

adds the zlabel to the Axis object ax instead of the current axis.

zlim(*args)

Set or get limits on z axis.

Calling:

zlim([zmin,zmax])

sets the z limits on the current axis.

Calling:

zlim(zmin,zmax)

gives the same results as above.

Calling:

zmin, zmax = zlim()

returns the z limits for the current axis.

Calling:

zlim(ax, ...)

affects the Axis object ax instead of the current axis.

Previous topic

scitools.easyviz.visit_

This Page