Contact: zeng  @  zegraph.com      Last update: 20 January 2010

ZePlot Library

Using the zeplot library typically involves 5 steps: (1) load the library; (2) create a zeplot object; (3) cerate and add objects to the scene of a zeplot object; (4) set object attributes; and (5) show or save the image. When the object added to the scene is a globe, plot, light, or node, it can be used to create and add objects as well. Objects that can be created include axis, colorbar, globe, light, line, node, plot, point, polygon, and text. Other objects like color, material, texture, texture coodinate, and vertex can be obtained from created objects.

In the default coordinate system of zeplot with image width w and height h, x varies from -w/2 to w/2, y from -h/2 to h/2; and z from the shorter of -w/2 and -h/2 to the shorter of w/2 and h/2; whereas the x-y-z ranges of a plot is determined by its x-, y-, and z-axis; and the x-y-z ranges of a globe is determined by its radius.

General

Function Input Remark
zeplot(width, height[, depth)); integers Creates a zeplot object and sets its image width and height. It is recommended to set the optional depth parameter to 32 for a 3D graph and to a small number (e.g., 3) for a 2D graph..
enable(obj, ...) user Enables objects.
disable(obj, ...) user disables objects.

Axis

.color(red, green, blue) numbers Sets the axis color.
.angle(deg) number Rotates the axis about itself for deg degrees.
.font()   Returns the axis' font object.
.font(n) integer Sets the font size to n points.
.font(file) string Sets the font file to be used by the axis.The file parameter must be the full path of a truetype font file.
.font(fnt) user Sets the font object fnt to be used by the axis.
.linewidth(w) number Sets the line width of axis.
.range(min, max) numbers Sets the axis range.
.smooth(flag) boolean Renders smooth lines if flag is true.
.showticks(flag) boolean Shows (flag=true) or hides the axis ticks.
.showlabels(flag) boolean Shows (flag= true) or hides the axis labels and title.
.title(string) string Sets the axis title. Refer to the string function of text for using subscript, superscript, and symbols.
.tickmarks(start, step, minor) numbers Sets the axis tick marks, i.e., the start value, the step between major ticks, and the number of minor tick marks between major tick marks.
.ticksize(factor) number Scales up or down the tick length.
.ticklabels(s1,s2,...[,center]) strings, boolean Customizes tick labels. If center=true, it puts labels between major ticks. Refer to the string function of text for using subscript, superscript, and symbols.
.tickdigits(n[, flag]) integer, boolean Sets the tick number digits. It uses the exponential format if flag=true.
.type(typename[, flag]) string, boolean Sets the axis as x-, y-, or z-axis for typename of "x", "y", or "z" respectively. If flag=true, x-axis ticks point to the left, y-axis ticks point down, and z-axis ticks point to the left.
.scale(sx, sy, sz) numbers Scales the axis in x-, y-, and z-diretion.
.translate(dx, dy, dz) numbers Moves the axis off the origin.

Color

.add(r, g, b, a[, r, g, b, a...]) numbers Adds color data of red, green, blue and alpha. Color data should be between 0 and 1.
.add(ptr, n[, e]) user, integers Adds color data of red, green, blue and alpha. The ptr must be a double or float pointer to n data, consisted of red, green, blue, and alpha. Color data should be between 0 and 1. The optional parameter e specifies the element size of the pointer (size of double by default).
.clear()   Clears color data.
.print([fname]) string Print color data to the screen or a file if fname is specified.
.size()   Returns the number of color datasets.
.get(idx) integer Returns the colors at idx as an array.
.set(idx, r, g, b, a) integer, number, number, number , number Replaces the color at idx.
.ptr()   Returns an array containing a pointer to color data, the number of points of the pointer, and the element size of the pointer.

Colorbar

.add(r, g, b, v[, r, g, b, v...]) numbers Adds color data (r, g, and b) for the contour value (v).
.clear()   Clears colorbar data.
.color(r, g, b) numbers Sets the color of colorbar label and lines.
.discrete(flag) boolean Sets colorbar type as discrete if flag= true.
.font()   Returns the font object of the colorbar.
.font(n)

integer

Sets the font size to n points.
.font(file) string Sets the typetype font file (full path to a file) to be used by the colorbar.
.font(fnt) user Sets the font object fnt to be used by the colorbar.
.get(value) number Returns color data for the contour value in an array: [0]=red, [1]=green, and [2]=blue.
.linewidth(w) number Sets the line width.
.labeldigits( n[, flag]) number, true/false Sets the label digits. Uses the exponential format if flag=true.
.position(xoffset, yoffset, width, height) numbers Sets the colorbar position. Position parameters are scale factors referring to the image width and height. If the resulted width > height, it produces a horizontal bar; otherwise a vertical bar.

Globe

.add(typename) string Creates an object and adds it to the globe. The type name may be "axis", "colorbar", "globe", "light", "line", "node", "plot", "point", "polygon", or "text". It returns the created object.
.add(typename, x, y, z) string, numbers Creates an object and anchors it at (x,y,z) in the globe.
.add(typename, ptr, n[, e]) string, user, integers Creates an object and anchors it in the globe .The parameter ptr must be a double or float pointer to n data of x-y-z coordinates. The optional parameter e specifies the element size of the pointer (size of double by default). It returns the created object.
.add(obj) user Adds the object to the globe.
.add(obj, x, y, z) user, numbers anchors the object at (x,y,z) in the plot.
.add(obj, ptr, n[, e]) user, user, integers anchors the object at in the globe at multiple positions.
.clear()   Clears all objects in the globe.
.rotatex(degree) number Sets the x-rotation transform
.rotatey(degree) number Sets the y-rotation transform
.rotatez(degree) number Sets the z-rotation transform
.scale(x, y, z) number Sets the scale transform
.translate(x, y, z) numbers Sets the translation transform
.reset()   Resets the transform to none.
.ll2xyz(longitude, latitude) numbers Transforms longitude-latitude in degree to x-y-z on the globe surface and returns x-y-z in an array.
.xyz2ll(x, y, z) numbers Transforms x-y-z to longitude-latitude in degree and returns the results in an array.
.lookat(ex, ey, ez, cx, cy, cz) numbers Looks at the globe from (ex, ey, xz) to (cx, cy, cz). The transform include translation, rotation around the z-axis and then the x-axis. It returns the translation offsets and rotation angles in an array.
.surface(radius[, iter]) numbers Generates polygons for the globe surface. You may control the smoothness of the surface by the optional iteration number. It returns a polygon object
.texture(radius, fname[, atlantic]) number, string, boolean Generates polygons for the globe surface and uses the image in fname (full path to a file) as the surface texture. If the atlantic ocean is in the image center, the atlantic flag should be true. It returns a polygon object.
.texture(radius, ptr, nr, nc[, atlantic]) number, user, integer, integer, boolean Generates polygons for the globe surface and generates image from data in ptr as the surface texture. The parameter ptr must be a double pointer to nr rows by nc columns of data. It returns a texture object.
.grid(deg[, w]) numbers Generates llines as the globe grid lines. It return a node object that contains the line objects.
focus(x, y) numbers Sets the focus point (longitude, latitude) on the globe, e.g., rotating the globe around the z-axis and the around the x-axis. It returns the rotation angles in an array.
.line(x1, y2, x2, y2) numbers Draws a line from (x1,y1) to (x2,y2) on the globe surface and returns a line object.
.gshhs(fname[, lw, yn]) string, number Draws coastlines using GSHHS data in the file fname on the globe surface and returns a node object. Use the optional parameter lw to set the line width and yn to set line smoothing attribute.
.field(U, V, X, nx, Y, ny, size, cbar) user, user, user, integer, user, integer, number, user Creates cones for expressing the wind field (U,V) at the grids (X,Y) and returns the node object that contains the cones. The parameters U, V, X, andY must be double pointers of size nx*ny, nx*ny,;nx, and ny respectively The size parameter controls the cone size corresponding to wind speed. The cbar must be a colorbar object for determing cone colors according to wind speeds.
.light(x, y, z) numbers Sets the light position and returns the light object. Note that the object must not be added to another object.
.sun(day, hour, minute, second) integers Sets the light position according to the sun's position at the specified time and returns the light object. Note that the object must not be added to another object.

Light

.ambient(red, green, blue) numbers Sets the ambient color of light.
.position(x, y, z) numbers Sets light position as if light comes in the direction of (x,y,z) to (0,0,0).
.add(typename) string Creates an object and adds it to the light. The type name may be "axis", "colorbar", "globe", "light", "line", "node", "plot", "point", "polygon", or "text". It returns the created object.
.add(obj) user Adds the object to the light.
.clear()   Clears all objects in the light.

Line

.add(x, y, z[, x, y, z...]) numbers Adds vertex coordinate data to the object.
.add(ptr, n[, e]) user, integers Adds vertex coordinate data to the object. The ptr must be a double or float pointer to n data, consisting x, y, and z cooridnates. The optional parameter e specifies the element size of the pointer (size of double by default).
.color(r, g, b[, a]) numbers Sets the default color.
.color(color) user Sets the color object to the line as vertex color.
.color()   Returns the vertex color object of the line.
.vertex(vertex) user Sets vertex to the line
.vertex()   Returns the vertex object of the line.
.normal(vertex) user Sets vertex object to the line as vertex normal
.normal()   Returns the vertex normal object of the line.
.dot(width[, factor]) numbers Sets the line style as dot of given width. The factor determines the length to width ratio between dots.
.dash(width[, factor]) numbers Sets the line style as dash of given width. The factor determines the length to width ratio between dashes.
.dotdash(width[, factor]) numbers Sets the line style as dot-dash of given width. The factor determines the length to width ratio between dot-dashes.
.solid(width) number Sets the line style as solid of given width.
.smooth(flag) true/false Renders smooth lines if flag=true.
.type( typename) string Sets the line type. Eligible typename include "lines", "loop", "strip".
.rotatex(degree) number Sets x-rotation transform
.rotatey(degree) number Sets y-rotation transform
.rotatez(degree) number Sets z-rotation transform
.scale(x, y, z) number Sets scale transform
.translate(x, y, z) numbers Sets translation transform
.reset()   Resets transform to none.
.circle(r) numbers Adds vertex and normal to the line to form a circle.
.contour(Z, X, nx, Y, ny, iso) user, user, number, user, number, number Adds to the line object vertex data from contouring for the iso-value found for Z at regular grids (X, Y). It returns a vertex object. The X, Y, and Z must be double pointers of size nx, ny, and nx*ny, respectively.
.contour(X, Y, Z, I, n, iso) user, user, user, user, number, number Adds object vertex data to the line from contouring for the iso-value found in triangles that are results of the delaunay() function in the matrix library. I and n are the pointer to triangle indices and the number of triangles, respectively. It returns a vertex object.
.contour(vertex, n, iso) user, integer, number Adds to the line object vertex data from contouring for the iso-value found in data of the vertex object. n must be 3 or 4, indicating whether a dataset of vertex forms a triangle or quads.
.gshhs(file, x1, x2, y1, y2) string, numbers Adds GSHHS costline coordinate data from the file in the given longitude/latitude ranges .
.vector(u, v, size) numbers Adds vertices to form an wind vector.

Material

.ambient(r, g, b[, a]) numbers Sets the ambient color of the material object.
.diffuse(r, g, b[, a]) numbers Sets the diffuse color of the material object.
.emission(r, g, b[, a]) numbers Sets the emission color of the material object.
.specular(r, g, b[, a]) numbers Sets the specular color of the material object.
.shininess(factor) numbers Sets the shininess factor (0 to 1).

Node

.add(typename) string Creates an object and adds it to the node. The type name may be "axis", "colorbar", "globe", "light", "line", "node", "plot", "point", "polygon", or "text". It returns the created object.
.add(obj) user Adds the object to the node.
.clear()   Removes all objects added to the node.
.remove(obj) use Removes the specified object from the node.
.color(r, g, b[, a]) numbers Sets the default color for objects in the node..
.get(idx) integer Gets the object at idx.
.rotatex(degree) number Sets x-rotation transform.
.rotatey(degree) number Sets y-rotation transform.
.rotatez(degree) number Sets z-rotation transform.
.scale(x, y, z) numbers Sets scale transform.
.translate(x, y, z) number Sets translation transform.
.reset()   Resets transform to none.
.size()   Returns the number of objects in the node.

Plot

.add(typename) string Creates an object and adds it to the plot. The type name may be "axis", "colorbar", "globe", "light", "line", "node", "plot", "point", "polygon", or "text". It returns the created object.
.add(typename, x, y, z) string, numbers Creates an object and anchors it at (x,y,z) in the plot . An anchored object will not be affected by the scaling transforms of the plot. It returns the created object.
.add(typename, ptr, n[, e]) string, user, integers Creates an object and anchors it in the plot .The parameter ptr must be a double pointer to n data contining x-y-z coordinates. The optional parameter e specifies the element size of the pointer (size of double by default). It returns the created object.
.add(obj) user Adds the object to the plot.
.add(obj, x, y, z) user, numbers Anchors the object at (x,y,z) in the plot.
.add(obj, ptr, n[, e]) user, user, integer Anchors the object at in the plot at multiple positions.
.clear()   Clears objects added to the plot.
.rotate(zdeg, xdeg) numbers Sets the z- and x-rotation transform, i.e., rotate about z-axis first and then about the x-axis.
.scale(x, y, z) numbers Sets the scale transform
.font()   Returns the font object being used by the plot.
.font(n) number Sets the font size to n points.
.font(fnt) user Sets the font object fnt to be used by the plot.
.font(file) string Sets the truetype font file (full path to a file)to be used by the plot.
.field(U, V, X, Y, n, size, colorbar) user, user, user, user, integer, number, user Plots 2D vector field. U, V, X, and Y must be double pointers to n data. U and V should have wind data scaled to produce proper size vectors. The size parameter determines the arrow head size; and the colorbar object is used to assign colors to vectors according to wind speed.
.field(U, V, X, nx, Y, ny, size, colorbar) user, user, user, integer, user, integer, number, user Plots 2D vector field. U and V should be double pointers to nx*ny wind data scaled to produce proper size vectors; X and Y are double pointers to grid coordinates. The size parameter determines the arrow head size; and the colorbar object is used to assign colors to vectors according to wind speed.
.field(U, V, W, X, Y, Z, n, size, colorbar) user, user, user, user, user, user, integer, number, user Plots 3D field using cones. Parameters have similar meaning to those of field(U, V, X, Y, n, size, colorbar) function.
.field(U, V, W, X, nx, Y,ny, Z, nz, size, colorbar) user, user, user, user, integer, user, integer, user, integer, number, user Plots 3D field using cones. Parameters have similar meaning to those of field(U, V, X, nx, Y, ny, size, colorbar) function.
.global(x, y, z) numbers Returns an array containing the global coordinate converted from the local coordinate. The x-y-z ranges of the plot should be set first before calling this function.
.local(x, y, z) numbers Returns an array containing the local coordinate converted from the global coordinate. The x-y-z ranges of the plot should be set first before calling this function.
.clip(flag) true/false Sets the clipping flag that determines showing or hiding vertices outside the x-y-z axis ranges.
.xaxis(xdir, ydir, zdir) numbers Anchors the x-axis of the plot. The signs of xdir, ydir, and zdir control the irection that the axisl moves awway from the origin. It returns the x-axis of the plot for further manipulation by axis functions.
.xaxis()   Returns the x-axis of the plot for further manipulation by axis functions.
.yaxis(xdir, ydir, zdir) numbers Anchors the y-axis of the plot. The signs of xdir, ydir, and zdir control the irection that the axisl moves awway from the origin. It returns the y-axis of the plot for further manipulation by axis functions.
.yaxis()   Returns the y-axis of the plot for further manipulation by axis functions.
.zaxis(xdir, ydir, zdir) numbers Anchors the z-axis of the plot. The signs of xdir, ydir, and zdir control the irection that the axisl moves awway from the origin. It returns the z-axis of the plot for further manipulation by axis functions.
.zaxis()   Returns the z-axis of the plot for further manipulation by axis functions.

Point

.add(x, y, z[, x, y, z...]) numbers Adds vertex coordinate data to the object.
.add(ptr, n[, e]) user, integers Adds vertex coordinate data to the object. The ptr must be a double or float pointer to n data, consisting x, y, and z coordinates. The optional parameter e specifies the element size of the pointer (size of double by default).
.color(r, g, b[, a]) numbers Sets the default color.
.color(color) user Sets color object to the point object as vertex color.
.color()   Returns the vertex color object of the point.
.vertex(vertex) user Sets the vertex object of the point
.vertex()   Returns the vertex object of the point.
.normal(vertex) user Sets the vertex object to the point as vertex normal
.normal()   Returns the vertex normal object of the point.
.size(n) number Sets the point size in pixel.
.smooth(flag) boolean Renders point as round dot if flag=true; otherwise as square.
.rotatex(degree) number Sets x-rotation transform
.rotatey(degree) number Sets y-rotation transform
.rotatez(degree) number Sets z-rotation transform
.scale(x, y, z) numbers Sets scale transform
.translate(x, y, z) numbers Sets translation transform
.reset()   Resets transform to none.
.bmp(filename[,bgR, bgG, bgB]) string, integer, integer, integer Adds to the point vertex and color objects that contains pixel coordinates (x from o to width-1; y from 0 to image height-1, z = 0) and colors of the image in the file. If the background color is specified and range from 0 to 255, pixels with the background color will be excluded. It returns the image width and height in an array.

Polygon

.add(x, y, z[, x, y, z...]) numbers Adds vertex coordinate data to the object.
.add(ptr, n[, e]) user, integers Adds vertex coordinate data to the object. The ptr must be a double or float pointer to n data, consisting x, y, and z coordinates. The optional parameter e specifies the element size of the pointer (size of double by default).
.color(r, g, b[, a]) numbers Sets the default color.
.color(color) user Sets the color object to the polygon as vertex color.
.color()   Returns the vertex color object of the polygon.
.vertex(vertex) user Sets the vertex object of the polygon.
.vertex()   Returns the vertex object of the polygon
.normal(vertex) user Sets the vertex object to the polygon as vertex normal.
.normal()   Returns the vertex normal object of the polygon.
.texcoord(texcoord) user Sets texture coordinate object to the polygon.
.texcoord()   Returns the texture coordinate object of the polygon.
.material(obj) user Sets the material object to the polygon.
.material()   Returns the material object of the polygon.
.texture(obj) user Sets the texture object to the polygon.
.texture()   Returns the texture object of the polygon.
.clockwise(flag) boolean Sets the polygon winding to clockwise if flag=true.
.cull(flag) number Seta cull face to none if flag=0, to cull front if flag>0, and to cull back if flag<0.
.fill(flag) number Renders polygon as points if flag=0, as filled polygons if flag>0, and as lines if flag<0.
.type(typename) string Sets the polygon type. Eligible typename include "triangles", "trianglestrip", "trianglefan", "quads", "quadstrip", and "polygon".
.smooth(flag) boolean Renders smooth polygon edges if flag=true.
.linewidth(w) number Sets polygon line width.
.rotatex(degree) number Sets x-rotation transform
.rotatey(degree) number Sets y-rotation transform
.rotatez(degree) number Sets z-rotation transform
.scale(x, y, z) numbers Sets scale transform
.translate(x, y, z) numbers Sets translation transform
.reset()   Resets transform to none.
.implicit(func, x1, x2, y1, y2, z1, z2, n) string, number, number, number, number, number, number, integer Creates implict surface. The callback function func(x, y, z) should return negative values for internal points and positve values otherwise. x1 to x2 specify x- y- and z-ranges. n specifies the number of grids in a range.
.uvsurface(func, u1, u2, v1, v2, n) string, number, number, number, number, integer Creates surface of x(u, v), y(u, v), and z(u, v) in the range of u1 to u2 and v1 to v2. n specifies the number of grids in a range. The callback function func(u, v) should return an array [x, y, z] for each (u, v).
.isosurface(W, X, nx, Y, ny, Z, nz, iso) user, user, number, user, number, user, number, number Adds vertex and normal objects to the polygon. Vertex data representing triangles of iso-surfaces of 4D data W on regular grids of X, Y, and Z. These user objects must be pointers to data of double.
.mesh( X, Y, Z, I, n) user, user, user, user, number Adds vertex and normal objects to the polygon to form meshes. Vertex data are from triangles resulted from the delaunay() function in the matrix library. The I and n are the pointer to triangle indices and the number of triangles, respectively.
.mesh(Z, X, nx, Y, ny) user, user, number, user, number Adds vertex and normal objects to the polygon form meshes. Vertex data are from drived from Z at regular grids (X, Y).
.pattern(str) string Sets the fill pattern of polygon. The string should be no shorter than 1024 characters with x and o marking fill and unfilled bits of a 32x32 bitmap.
.gshhs(file, x1, x2, y1, y2) string, numbers Creates fill polygon from the GSHHS file in the specified longitude/latitude ranges.
.box(size) number Adds to vertex and normal objects to the polyson to form box surface of the size.
.cone(h, r) numbers Adds to vertex and normal objects to the polyson to form cone surface of radius r and height h.
.cylinder(h, r) numbers Adds to vertex and normal objects to the polyson to form cylinder surface.
.disk(r) number Adds to vertex and normal objects to the polyson to form disk surface.
.torus(R, r) numbers Adds to vertex and normal objects to the polyson to form torus surface.
.sphere(r, [n, flag]) number, integer, true/false Adds to vertex and normal objects to the polyson to form a sphere surface of radius=r. If flag=true the polygon will have texture coordinate object and n is the degree of increment for slicing the sphere; otherwise, 0<n<=8 is the iteration number for tetrahedron tesselation.

Texture Coordinate

.add(s, t [, s, t ...]) numbers Adds texture coordinate data to the object.
.add(ptr, n[,e ]) user, integers Adds texture coordinate data to the object. The ptr must be a double or float pointer to n data, consisting s and t texture coordinates between 0 and 1. The optional parameter e specifies the element size of the pointer (size of double by default).
.clear()   Clears texture coordinate data.
.print([fname]) string Print texture coordinate data to the screen or the file.
.size()   Returns the number of datasets in the texture coordinate object.
.get(idx) integer Returns the texture coordinates at idx as an array.
.set(idx, s, t) integer, number, number Sets s and t to the texture coordinate at idx.
.ptr()   Returns an array containing a pointer to data, the number of data, and the element size of a datum.

Text

.color(r, g, b) user, numbers Sets text color.
.font()   Returns the font object being used by the text.
.font(n) number Sets the font size to n points.
.font(fnt) user Sets the font object fnt to be used by the text.
.font(file) string Sets the truetype font file (full path to a file) to be used by the text.
.string(str) string Sets the text string to be rendered. A superscript and subscript may be marked by these pairs of tags: <sub> and </sub>, <sup> and </sup>, respectively. Character symbols may be embedded in string with their unicode in hexadecimal number (e.g., 0x01C1). The following symbol names may also be used between <sym> and </sym>: alpha, beta, gamma, delta, epsilon, zeta, eta, theta, iota, kappa, lambda, mu, nu, xi, pi, rho, sigma, tau, upsilon, phi, chi, psi, omega, Gamma, Delta, Theta, Lambda, Xi, Pi, Sigma, Phi, Psi, and Omega. It return the width and height of the rendered string in an array.
.rotatex(degree) number Sets x-rotation transform
.rotatey(degree) number Sets y-rotation transform
.rotatez(degree) number Sets z-rotation transform
.scale(x, y, z) numbers Sets scale transform
.translate(x, y, z[,xalign, yalign]) numbers Sets translation transform. The optional parameters xalign and yalign determines the x-alignment (-1: left; 0: center; 1: right) and y-alignment (-1: bottom; 0: middle; 1: top).
.reset()   Resets transform to none.

Texture

.image(filename,bR, bG, bB) string, numbers Load image from the file to the texture object. The bR, bG, and bB determine the alpha color. If the they are negative, the texture is opaque. It returns an array containing the texture coordinate boundary (s,t) and image size (w,h).
.data(ptr, width, height, cbar) user, integer, integer, user Makes texture using data in ptr and the colorbar cbar. The parameter ptr must be a pointer to double data of width*height size. It returns an array containing the texture coordinate boundary (s,t).

Vertex

.add(x, y, z[, x, y, z...]) numbers Adds vertex coordinate data to the object.
.add(ptr, n[, e]) user, integers Adds vertex coordinate data to the object. The ptr must be a double or float pointer to n data, consisting x, y, and z coordinates. The optional parameter e specifies the element size of the pointer (size of double by default).
.clear()   Clears data in the vertex.
.color(colorbar, color) users Adds colors to the input color object according to the colorbar and the z-values of the vertex.
.normal(np, vertex) integer, user Adds vertices to the input vertex object to be used as vertex normal. np=1, 2, 3, or 4 indicates that the vertex data comprise points, linestrip, triangles, or quads.
.print([fname]) string Print vertex data to the screen or the file.
.rotatex(degree) number Applies x-rotation transform on vertex data.
.rotatey(degree) number Applies y-rotation transform on vertex data.
.rotatez(degree) number Applies z-rotation transform on vertex data.
.scale(x, y, z[, flag]) numbers Applies scale transform on vertex data. If the optional flag is true, vertex data will be normalized.
.translate(x, y, z) numbers Applies translate transform on vertex data.
.get(idx) integer Returns an array containing x, y, and z at idx.
.set(idx, x, y, z) integer, number, number, number Sets x, y, and z to the vertex at idx.
.size()   Returns the number of datasets in the caller.
.ll2xyz([r]) number Transforms longitude-latitude in degree to x-y-z on a spherical surface with radius r (default is 1).
.xyz2ll() number Transforms x-y-z to longitude-latitude in degree.
.map(yl, x0) numbers Transforms longitude/latitude in degree to x-y-z on an oval-shaped map. The yl is the y-length from 0 to -90/90 degree latitude and x0, the center longitude.
.polar(ra, po, x0) numbers Transforms longitude/latitude in degree to x-y-z on an polar-view map. The ra is the radius length from the pole po, which should be either 90 or -90, and x0, the longitude along the global y-axis.
.ptr()   Returns an array containing a pointer to data, the number of data, and the element size of a datum.

ZePlot

.add(typename) string Creates an object and adds it to the scene of zeplot. The type name may be "axis", "colorbar", "globe", "light", "line", "node", "plot", "point", "polygon", or "text". It returns the created object.
.color(r, g, b) numbers Sets the foreground color.
.bgcolor(r, g, b) numbers Sets the background color.
.lookat(ex, ey, ez, cx, cy, cz) numbers Looks at the scene of zeplot from (ex,ey,ez) to (cx,cy,cz).
.perspective(flag[, factor]) boolean, number Uses perspective view if flag=true. The scale factor modifies the perspective depth.
.show([node, ms]) user, integer Creates a window and renders the scene of zeplot in it. If the node and time interval (ms) parameters are specified, the window responds to mouse and key interactions: mouse-dragging and arrow keys rotate the node; double-clicking animate the node; and right-clicking reset the node to its initial status.
.towindow(hwnd) user Renders image to the window handle.
.tofile(filename) string Renders image to the file. The image format is determined by the file extension, which may be "bmp", "tif", "png", "jpg", "gif", or "emf". If the file name is "stdout" (e.g., "stdout.png") the image will be send to the standart output device, which may be useful for web application. If the file name is "stream" (e.g., "stream.png"), the function returns an array containing pointer to image stream and the number of bytes.
.togifa(fname[, delay) string, integer Renders image to GIF animation with the frame rate (in 1/100s unit) controlled by the optional delay parameter. Initially, fname should be a file name with "gif" extension; then fname should be "add" for adding image to the file or "end" for ending the animation.
.toarray(R, G, B, n) user, user, user, number Renders image colors to R, G, and B which should be pointers to n bytes of data.
.totextue(texture[, r, g, b]) user, integers Renders the image to the texture object. Use r, g, and b to specify the transparent color if necessary.