For beginner, follow these steps to learn ZeGraph: (1) Read the concept page; (2) Try scripts in the example page and read comments in scripts.
The tofile function of render object supports image formats of PNG, TIFF, GIF, JPEG, JPEG2000, and BMP. PNG and TIFF are recommend if you use texture or your graph has rich colors. The compression of these two formats is lossless and therefore produce better printout than GIF or JPEG. GIF may gives the smallest file size, but the color is limited to 256. JPEG is not recommended if you have text in a graph. JPEG2000 is supposed to be able to produce small file size while maintaining good image quality, but applications supporting the format is limited.
For 2D plot, you may consider to render a scene to the enhanced meta file (EMF). Because EMF is a vector graph format, its printout quality is very high.
For a web application or demonstration, saving a scene to WRL (the format of Virtual Reality Modeling Language) may be the best way to maintain 3D details of the scene.
Refer to METEX web site for application examples.
Function  Parameter Type  Remark 
zegraph(name[,...]);  string  Returns a ZeGraph object if only one argument is used; otherwise returns an array of ZeGraph objects. Eligible type include "axis", "color", "colorbar", "font", "globe", "light", "line", "material", "node", "point", "plot", "polygon", "render", "scene", "texcoord", "text", "texture", and "vertex". 
enable(obj, ...)  user  Enables objects. 
disable(obj, ...)  user  disables objects. 
direction(x1, y1, z1, x2, y2, z2)  numbers  Returns an array with latitude in [0] and longitude in [1] that represent the vector direction from (x1, y1, z1) to (x2, y2, z2). 
normal(x0, y0, z0, x1, y1, z1, x2, y2, z2, flag)  numbers, string  If flag="line", returns an array with x in [0], y in [1], and z in [2] as the line (p(x0, y0, z0), p(x1, y1, z1), p(x2, y2, z2) ) normal at (x1, y1, z1); otherwise, returns an array with x in [0], y in [1], and z in [2] as the normal of the plane determined by vectors of (x1x0, y1y0, z1z0) and (x2x0, y2y0, z2z0). 
aitoff(lon, lat[, scale])  numbers  Aitoff map projection. Refer to corresponding function of vertex for details. 
denoyer(lon, lat[, scale])  numbers  Denoyer map projection. Refer to corresponding function of vertex for details. 
echert(lon, lat[, scale])  numbers  Echert V map projection. Refer to corresponding function of vertex for details. 
wagner(lon, lat[, scale])  numbers  Wagner II map projection. Refer to corresponding function of vertex for details. 
ll2xyz(lon, lat[, r])  numbers  Transforms longitudelatitude in degree to xyz on a spherical surface with radius r (default is 1). Returns an array. 
xyz2ll(x, y, z)  numbers  Transforms xyz to longitudelatitude in degree. Returns an array. 
.angle(deg)  number  Rotates the axis about itself for the given degree. Note that you should set the axis type first. 
.color(r, g, b)  numbers  Sets axis color. 
.font(fnt, n)  user, number  Sets to the axis the font object fnt with font size of n points. 
.offset(dx,dy, dz)  numbers  Moves the axis off the origin of the global coordinate. 
.range(min, max)  numbers  Sets axis range. 
.showticks(flag)  boolean  Shows (flag=true) or suppress axis ticks. 
.showlabels(flag)  boolean  Shows (flag= true) or suppress axis labels and title. 
.title(str)  string  Sets axis title. Refer to the string function of text for using subscript, superscript, and symbols. 
.tickmarks(start, end, step, minor)  numbers  Sets axis tick marks, i.e., the start and end values, the step between major ticks, and the number of minor tickmarks between major tickmarks. 
.ticksize(factor)  number  Scales up or down the tick length. 
.ticklabels(label[, label,...[center]])  strings, boolean  Customizes tick labels. If The last optional parameter is boolean and true, labels will be positioned between major ticks. Refer to the string function of text for using subscript, superscript, and symbols. 
.tickdigits(n[, flag])  integer, boolean  Sets tick number digits. Uses exponential format if flag= true. 
.type(type[, flag])  string, boolean  Sets axis as x, y, or zaxis if type is "x", "y", or "z". If flag=true, xaxis ticks point down, yaxis ticks point to the left, and zaxis ticks point to the left. Use false to change tick directions. 
.width(w)  number  Sets the line width of axis. 
.add(r, g, b[, a[, r, g, b, a...]])  numbers  Adds data of red, green, blue and alpha to the color object. Color data should be between 0 and 1. 
.add(ptr, n)  number  Adds data to the color object. The object ptr is a pointer to n double data, consisted of red, green, blue, and alpha. Color data should be between 0 and 1. 
.clear()  Clears data in the color object.  
.print([fname])  string  Print color data to the screen or the file. 
.ptr()  Returns array containing float pointer to color data, number of data, and bytes of float type. Data are arranged as r1, g1, b1, a1, r2, g2, b2, a2, and so on.  
.size()  Returns the number of color datasets in the caller.  
.set(index, r, g, b,[ a])  integer, number, number, number , number  Sets red, green, blue, and alpha to the color data at the index. 
.add(r, g, b, v)  numbers  Adds color data for the contour value. 
.clear()  Clears colorbar data.  
.color(r, g, b)  numbers  Sets colorbar label color. 
.discrete(flag)  boolean  Sets colorbar as discrete type if flag= true. 
.font(fnt, n)  user, number  Sets to the colorbar the font object fnt with font size of n points. 
.get(value)  number  Returns color data for the contour value in an array: [0]=red, [1]=green, and [2]=blue. 
.interpolate(n)  number  Interpolates colorbar data n times. 
.labeldigits( n[, flag])  number, true/false  Sets label digits. Uses 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 width > height, produces a horizontal bar; otherwise a vertical bar. 

users  Composite solid geometry AND operation using stencil buffer.  

users  Composite solid geometry OR operation using stencil buffer.  

users  Composite solid geometry SUBTRACT operation using stencil buffer. 
.truetype(fname)  string  Sets font object to use the specified truetype font. fname must be a full path to a truetype font file. 
.add(obj)  user  Adds an object to a special node in the globe. Returns the node object. 
.add(obj, lon, lat)  user, number, number  Adds an object to a special node in the globe and sets the objects at given longitude and latitude. Returns the node object. 
.add(obj, X, Y, n)  user, user, user, number  Adds an object to a special node in the globe and sets the objects at given longitude (X) and latitude (Y). X and Y must be pointers to n double data. Returns the node object. 
.clear()  Clears objects added to the globe.  
.focus(lon, lat)  numbers  Sets view focus point at the given longitude and latitude. 
.field(U, V, X, nx, Y, ny, r, colorbar)  user, user, user, integer, user, integer, number, user  Creates cones to present wind field. U and V are pointers to data of double of u and vwind; X is pointer to nx data of double of xgrid; Y is pointer to ny data of double of ygrid; r is the bottom radius of a cone; and colorbar object is used to set cone color according to wind speed. 
.grid(deg[, width])  integer, number  Creates lines of given width to form longitude/latitude grid in given degree interval. Returns the node object that contains those lines. 
.gshhs(fname[, width])  string, number  Reads GSHHS data from fname and creates line objects to present coastlines. If not set, the default line width is 1. Returns the node object that contains those lines. The longitude of coastlines range from 180 to 180. 
.keep()  Keeps the last added object so that it will not be cleared.  
.light()  user  Gets the light of the globe. 
.light(x, y, z)  numbers  Sets the light position of the globe. 
.line(lon1, lat1, lon2, lat2)  numbers  Draws a line from (lon1, lat1) to (lon2, lat2). Returns the line onject. 
.radius(r)  number  Sets globe radius to be used by field, grid, gshhs, and line functions. The radius may be reset by surface and texture functions. 
.sun(day,hour)  integers  Sets the light position so that the light acts like the sun. 
.surface(r[, iters])  number, integer  Creates triangles to form the surface of globe and returns a polygon object. The optional parameter iters (between 1 and 8) may be used to specify the fineness of surface triangles. 
.texture(r, fname[, flag])  number, string, boolean  Creates quads to form the surface of globe with radius of r and uses the image in fname as texture. You should set the optional flag to true if the image represents a map for longitude of 180 to 180 degree. It returns a texture object that may be used by other polygons. 
.texture(r, data, nrow, ncol, colorbar[, flag])  number, string, boolean  Creates quads to form the surface of globe with radius of r and uses data and colorbar to create texture for the surface. data should points to nrow by ncol data of doubletype and colorbar must be a color bar object. You should set the optional flag to true if the data represent grids for longitude of 180 to 180 degree. It returns a texture object that may be used by other polygons. 
.add(obj[,obj...])  users  Adds objects to the light to be illuminated. Returns a node object. 
.ambient(r, g, b[, a])  numbers  Sets the ambient color of light. 
.clear()  Removes all objects in the 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(...)  numbers or users  Adds data to the vertex object of line. Returns the vertex object. Refer to the add function of vertex for details. 
.color(r, g, b[, a])  numbers  Sets line color. 
.color(color)  user  Sets the color object to the line as per 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 length to width ratio between dots. 
.dash(width[, factor])  numbers  Sets the line style as dash of given width. The factor determines length to width ratio between dashes. 
.dotdash(width[, factor])  numbers  Sets the line style as dotdash of given width. The factor determines length to width ratio between dotdashes. 
.solid(width)  number  Sets the line style as solid of given width. 
.smooth(flag)  true/false  Renders smooth lines if flag is true. 
.type( typename)  string  Sets the line type. Eligible typename include "lines", "loop", "strip". 
.rotatex(degree)  number  Sets xrotation transform, i.e., rotates all vertices in the line around xaxis. 
.rotatey(degree)  number  Sets yrotation transform, i.e., rotates all vertices in the line around yaxis. 
.rotatez(degree)  number  Sets zrotation transform, i.e., rotates all vertices in the line around zaxis. 
.scale(x, y, z)  number  Sets scale transform, i.e., scales all vertices in the line along x,y, and zaxis. 
.translate(x, y, z)  numbers  Sets translation transform, i.e., moves all vertices in the line along x,y, and zaxis. 
.reset()  Resets transform to none.  
.gshhs(fname, west, east, south, north)  string, numbers  Reads coastline data from GSHHS data file to make map. west>=180, east<=360, south>=90, and north<=90. 
.circle(r)  numbers  Adds vertex and normal to the line to form a circle on the xy plane. 
.contour(Z, X, nx, Y, ny, iso)  user, user, number, user, number, number  Adds to the line object vertex data from contouring for the isovalue (iso) found for Z at regular grids (X, Y). Returns a vertex object. X, Y, and Z must be pointer of double of nx, ny, and nx*ny number of data, respectively. 
.contour(X, Y, Z, I, n, iso)  user, user, user, user, number, number  Adds to the line object vertex data from contouring for the isovalue (iso) 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. Returns a vertex object. 
.contour(vertex, n, iso)  user, integer, number  Adds to the line object vertex data from contouring for the isovalue (iso) found in data of the vertex object. n must be 3 or 4, indicating whether a dataset of vertex forms a triangle or quads. 
.vector(u, v, size)  numbers  Adds to the line object vertices to form an wind vector. 
.ambient(side, r, g, b[, a])  numbers  Sets the ambient color of the material object. 
.diffuse(side, r, g, b[, a])  numbers  Sets the diffuse color of the material object. 
.emission(side, r, g, b[, a])  numbers  Sets the emission color of the material object. 
.specular(side, r, g, b[, a])  numbers  Sets the specular color of the material object. 
.shininess(factor)  number  Sets the shininess factor (0 to 1). 
.add(obj[, ...])  users  Adds objects to the node. 
.clear()  Clears objects in the node.  
.color(r, g, b[, a])  numbers  Sets the default color for objects in the node. 
.get(index)  integer  Gets the object at the index. 
.remove(obj[, ...])  users  Remove objects from the node. 
.reset()  Resets transform to none.  
.rotatex(degree)  number  Sets xrotation transform, i.e., rotates all objects in the node around xaxis. 
.rotatey(degree)  number  Sets yrotation transform, i.e., rotates all objects in the node around yaxis. 
.rotatez(degree)  number  Sets zrotation transform, i.e., rotates all objects in the node around yaxis. 
.scale(x, y, z)  numbers  Sets scale transform, i.e., scales all objects in the node along x, y, and zaxis. 
.size()  Returns the number of objects in the node.  
.translate(x, y, z)  number  Sets translation transform, i.e., moves all objects in the node along x, y, and zaxis. 
.add(obj)  user  Adds an object to the plot. 
.add(obj, x, y, z)  user, numbers  Anchors the object at (x, y, z) in the plot coordinate. An anchored object will not be affected by the rotation and scaling transforms of the plot. 
.add(obj, X, Y, Z, n)  user, user, user, user, integer  Anchors the object at (X, Y, Z) in the plot coordinate. X, Y, and Z must be pointers to n double data. 
.clabel(line, text, density, r, g, b)  user, user, integer, number, number, number  Adds contour labels to the plot. line must be a line object with contour vertices (see line.contour() function); text must be a text object; density > 0 specifies how frequent labels will be drawn along the line; and the rest of the parameters define the background color of labels. 
.clear()  Clears objects added to the plot by add and anchor functions.  
.rotate(zdeg, xdeg)  numbers  Sets the z and xrotation transform, i.e., rotate about zaxis first and then about the xaxis. 
.scale(x, y, z)  numbers  Sets the scale transform 
.font(fnt, n)  user, number  Sets to the plot the font object fnt with font size of n points. 
.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 their sizes. 
.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 their sizes. 
.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 (x, y, z), i.e., [0] = x, [1] = y, and [2] = z. 
.local(x, y, z)  numbers  Returns an array containing the local coordinate converted from the global coordinate (x, y, z), i.e., [0] = x, [1] = y, and [2] = z. 
.xaxis(xdir, ydir, zdir)  numbers  Anchors the xaxis of the plot. The signs of xdir, ydir, and zdir control the direction that the axisl moves away from the origin. Returns the xaxis object. 
.xaxis()  Returns the xaxis of the plot for further manipulation by axis functions.  
.yaxis(xdir, ydir, zdir)  numbers  Anchors the yaxis of the plot. The signs of xdir, ydir, and zdir control the direction that the axisl moves away from the origin. Returns the yaxis object. 
.yaxis()  Returns the yaxis of the plot for further manipulation by axis functions.  
.zaxis(xdir, ydir, zdir)  numbers  Anchors the zaxis of the plot. The signs of xdir, ydir, and zdir control the direction that the axisl moves away from the origin. Returns the zaxis object. 
.zaxis()  Returns the zaxis of the plot for further manipulation by axis functions. 
.add(...)  numbers or users  Adds data to the vertex object of point. Returns the vertex object. Refer to the add function of vertex for details. 
.color(r, g, b[, a])  numbers  Sets point object color. 
.color(color)  user  Sets color object to the point object as per 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 xrotation transform, i.e., rotates all vertices in the point around xaxis. 
.rotatey(degree)  number  Sets yrotation transform, i.e., rotates all vertices in the point around yaxis. 
.rotatez(degree)  number  Sets zrotation transform, i.e., rotates all vertices in the point around yaxis. 
.scale(x, y, z)  numbers  Sets scale transform, i.e., scales all vertices in the point along x, y, and zaxis. 
.translate(x, y, z)  numbers  Sets translation transform, i.e., moves all vertices in the point along x, y, and zaxis. 
.reset()  Resets transform to none.  
.bmp(fame[,bgR, bgG, bgB])  string, integer, integer, integer  Adds to the point vertex and color objects that contains pixel coordinates (x from o to width1; y from 0 to image height1, 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 image with and height as array. 
.add(...)  numbers or users  Adds data to the vertex object of polygon. Returns the vertex object. Refer to the add function of vertex for details. 
.color(r, g, b[, a])  numbers  Sets polygon color. 
.color(color)  user  Sets the color object to the polygon as per 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.  
.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 if flag>0, and as lines if flag<0. 
.gshhs(fname, west, east, north, south)  string, numbers  Reads coastline data from GSHHS data file to make filled map. west>=0, east<=360, south>=90, and north<=90. If you want a filled map with west<0, you must call the function with west>180 and east<=360 and then call vertex's translate function to convert longitude to 180 to 0. 
.type(name)  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. 
.width(w)  number  Sets polygon line width. 
.rotatex(degree)  number  Sets xrotation transform, i.e., rotates all vertices in the polygon around xaxis. 
.rotatey(degree)  number  Sets yrotation transform, i.e., rotates all vertices in the polygon around yaxis. 
.rotatez(degree)  number  Sets zrotation transform, i.e., rotates all vertices in the polygon around zaxis. 
.scale(x, y, z)  numbers  Sets scale transform, i.e., scales all vertices in the polygon along x, y, and zaxis. 
.translate(x, y, z)  numbers  Sets translation transform, i.e., moves all vertices in the polygon along x, y, and zaxis. 
.reset()  Resets transform to none.  
.material(mat)  user  Sets the material object to the polygon. 
.texture(tex)  user  Sets the texture object to the polygon. 
.implicit(func, x1, x2, y1, y2, z1, z2, n)  string, number, number, number, number, number, number, integer  Creates implicit surface of func(x,y,z)=0. x1 and x2 specify xranges; y1 and y2 specify yrange; z1 and z2 specify zrange; and 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 u and vrange. The callback function func(u, v) should return an array [x, y, z] for each (u, v). 
.isosurface(W, X, nxl, Y, ny, Z, nzl, iso)  user, user, number, user, number, user, number, number  Adds vertex and normal objects to the polygon. Vertex data representing triangles of isosurfaces of 4D data W on 3D regular grids of X, Y, and Z. These user objects must be pointers to data of double. W must contains data indexed by iz, iy, and ix, i.e., w=W[iz,iy,ix]; 
.mesh( X, Y, Z, I, n)  user, user, user, user, number  Adds vertex and normal objects to the polygon. Vertex data are from triangles resulted from the delaunay() function in the matrix library. 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. Vertex data are derived from Z at regular grids (X, Y). 
.pattern(str)  string  Sets the fill pattern of polygon. The string should be no shorter than 8*n (n>0) characters with x and o marking fill and unfilled bits of a 32x32 bitmap. 
.box(size)  number  Adds vertex and normal objects to the polygon to form a box with the center at (0,0,0). 
.cone(h, r)  numbers  Adds vertex and normal objects to the polygon to form cone surface of radius r and height h. 
.cone(u, v, w, r)  numbers  Adds vertex and normal objects to the polygon to form cone surface to be used as a 3Dwind vector. 
.cone(R, lon, lat, u, v, r)  numbers  Adds vertex and normal objects to the polygon to form cone surface to be used as wind vector on spherical surface (radius=R). 
.disk(r)  number  Adds vertex and normal objects to the polygon to form disk surface. 
.cylinder(h, r)  numbers  Adds vertex and normal objects to the polygon to form cylinder surface. 
.torus(R, r)  numbers  Adds vertex and normal objects to the polygon to form torus surface. 
.sphere(r)  number  Adds vertex and normal objects to the polygon to form a sphere surface of radius=r. 
.add(scene[, scene, ...])  user, ...  Adds scene objects to the render. 
.clear()  Clears scene objects from the render.  
.color(r, g, b)  numbers  Sets the background color of image. 
.show([obj, ms[, func]])  user, integer, string  Creates a window and renders scenes in it. If the transformable object (obj, which can be rotated.) and time interval (ms) parameters are specified, the window responds to mouse and key interactions: dragging mouse or pressing arrow keys rotate the object; doubleclicking animate the object; and rightclicking reset the object to its initial status. You may assign a callback function func to handle message of timer and mouseclicking. The first parameter input of func will be "TIMER" for timer event and "LBUTTON" for leftmousebuttonclicking; and the second and the third inputs are x and y coordinates respectively in case of mouseclicking event. 
.size(width, height[, depth])  numbers  Sets the image width and height, and optionally the depth. For 3D graphics, the depth should be at least 24 (32 by default); and for 2D graphic, a depth of 2 may be enough. Smaller depth reduces memory usage. 
.size()  Returns the image size as an array ([0]=width and [1]=height).  
.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 standard 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 a 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 and n=width*height. 
.add(obj[, obj, ...])  user  Adds objects to the root node. Returns the node. 
.color(r, g, b[, a])  numbers  Sets the default foreground color. 
.root(node)  number  Sets the root node. 
.viewport(x, y, w, h)  numbers  Sets the viewport starting at (x, y) and having width w and height h. 
.perspective(flag[, factor])  boolean, number  Uses perspective view if flag=true. The optional factor scales the perspective depth. 
.color(r, g, b)  user, numbers  Sets text color. 
.font()  Return the font object of text.  
.font(n)  number  Sets font size to n points. 
.font(fnt, n)  user, number  Sets to the text the font object fnt with font size of n points. 
.size()  Return the size of the rendered text string as an array: [0] = width and [1] = height.  
.string(str)  string  Sets the text string to be rendered. Superscript and subscript may be
marked by these pairs of tags: <sub> and </sub>, <sup>
and </sup>, respectively. 
.rotatex(degree)  number  Sets xrotation transform, i.e., rotates text around xaxis for given degree. 
.rotatey(degree)  number  Sets yrotation transform, i.e., rotates text around yaxis for given degree. 
.rotatez(degree)  number  Sets zrotation transform, i.e., rotates text around zaxis for given degree. 
.scale(x, y, z)  numbers  Sets scale transform, i.e., scales text along x, y, and zaxis. 
.translate(x, y, z)  numbers  Sets translation transform, i.e., moves text along x, y, and zaxis. 
.reset()  Resets transform to none. 
.image(fname[,bR, bG, bB])  string, numbers  Loads image from the file to the texture object and returns an array with maxium texture coordinates along x and y axis, and image width and height. The bR, bG, and bB determine the transparent alpha color. If they are outside the range of 0 to 255, the texture is opaque. It returns the maximum texture coordinate s and t in an array. 
.data(ptr, nrow, ncol, cbar)  user, integer, integer, user  Sets texture data and returns an array with maxium texture coordinates along x and y axis. ptr is the pointer to double data of nrow by ncol and cbar is a color bar object. It returns the maximum texture coordinate s and t in an array. 
.add(s, t [, s, t ...])  numbers  Adds texture coordinate data to the object. 
.add(ptr, n)  user, number  Adds texture coordinate data to the object. ptr must be a pointer to n double data, consisting s and t data between 0 and 1. 
.clear()  Clears texture coordinate data.  
.print([fname])  string  Print texture coordinate data to the screen or the file. 
.ptr()  Returns array containing float pointer to color data, number of data, and bytes of float type. Data are arranged as s1, t1, s2, t2, and so on.  
.size()  Returns the number of datasets in the texture coordinate object.  
.set(index, s, t)  integer, number, number  Sets s and t to the texture coordinate at the index. 
.add(x, y, z[, x, y, z...])  numbers  Adds vertex coordinate data to the object. 
.add(ptr, n)  user, number  Adds vertex coordinate data to the object. The ptr must be a pointer to n data of double type, consisting x, y, and z data. 
.clear()  Clears data in the vertex.  
.color(colorbar)  user  Returns a color object whose colors are determined by the colorbar and the zvalues of the vertex. 
.normal(np)  integer  Returns a vertex object to be used as vertex normal. np=1, np=3, np=4 indicates that the vertex data of the caller comprise points, triangles, or quads. 
.print([fname])  string  Print vertex data to the screen or the file. 
.ptr()  Returns array containing float pointer to color data, number of data, and bytes of float type. Data are arranged as x1, y1, z1, x2, y2, z2, and so on.  
.rotatex(degree)  number  Applies xrotation transform on vertex data. 
.rotatey(degree)  number  Applies yrotation transform on vertex data. 
.rotatez(degree)  number  Applies zrotation transform on vertex data. 
.scale(x, y, z)  numbers  Applies scale transform on vertex data. 
.translate(x, y, z)  numbers  Applies translate transform on vertex data. 
.tess([winding])  number  Triangulates polygon vertices. The default winding is 1. 
.tess(left, right, bottom, top)  number  Triangulates polygon vertices with the second contour defined by the four parameters. 
.set(index, x, y, z)  integer, number, number, number  Sets x, y, and z to the vertex at the index. 
.size()  Returns the number of datasets in the vertex.  
.aitoff([scale])  number  Aitoff map projection based on the equations x=2*a*cos(lat)*sin(0.5*lon)/sin(a), y=a*sin(lat)/sin(a), and cos(a)=cos(lat)*cos(0.5*lon) of Cartographic Projection Procedures by G.I. Evenden. The longitude and latitude data in the vertex should vary from 180 to 180 and from 90 to 90, respectively. Resulted xy vary from 3.06 to 3.10 and from 1.48 to 1.54 respectively if scale=1 (default). 
.denoyer([scale])  number  Denoyer map projection based on the equations x=lon*cos((0.95lon/12+lon^{3}/600)*lat) and y=lat of Cartographic Projection Procedures by G.I. Evenden. The longitude and latitude data in the vertex should vary from 180 to 180 and from 90 to 90, respectively. Resulted xy vary from 3.07 to 3.10 and from 1.37 to 1.46 respectively if scale=1 (default). 
.echert([scale])  number  Echert V map projection based on the equations x=lon*(1+cos(lat))/sqrt(2 + π) and y=2*lat/sqrt(2+π) of Cartographic Projection Procedures by G.I. Evenden. The longitude and latitude data in the vertex should vary from 180 to 180 and from 90 to 90, respectively. Resulted xy vary from 2.71 to 2.74 and from 1.21 to 1.28 respectively if scale=1 (default). 
.wagner([scale])  number  Wagner II map projection based on the equations x=0.92483*lon*cos(θ) and y=1.38725*θ and sin(θ)=0.88022*sin(0.8855*lat) of Cartographic Projection Procedures by G.I. Evenden. The longitude and latitude data in the vertex should vary from 180 to 180 and from 90 to 90, respectively. Resulted xy vary from 2.9 to 2.9 and from 1.34 to 1.34 respectively if scale=1 (default). 
.ll2xyz([r])  number  Transforms longitudelatitude in degree to xyz on a spherical surface with radius r (default is 1). 
.xyz2ll()  number  Transforms xyz to longitudelatitude in degree. 