1.2

| home | graph lib | utility lib | custom lib | auxiliary lib | tutorials |

   Axis
   Blend
   Color
   ColorBar
   Fog
   Freetype
   Light
   Line
   Material
   Node
   Point
   Plot
   Polygon
   Render
   Scene
   Stencil
   TexCoord
   Text
   Texture
   Vertex

zePlot

Use .new("plot") to create the object. It redefines coordinates for objects it contains, but conserves text size of zeAxis objects. The z-axis is disabled by default. However, any call the set() function with axis="z" will enable the axis.

:add(object[, object, ...])

object - any graph object except zeRender and zeScene.

Adds a number of objects to the plot.

:add(object, x, y, z)

object - any graph object except zeRender and zeScene.
x, y, z - numbers.

Adds a object to the node and position it at x, y, and z in the plot coordinate system. If the object is zeText, it will neither be scaled nor rotated by the plot. Any other type of obejcts will be rotated but scaled by the plot.

:font(object)

object - a zeFreetype object.

Sets the Freetype object to be used to generate text.

:fontsize(size)

size - a number for font size.

Sets font size of axes. The function must be called before setting the axis and tick labels.

:rotate(az, ax)

az - a number for the rotaion angle around the z-axis.
ax - a number for the rotaion angle around the x-axis.

The function rotates the object first around the z-axis and then around the x-axis.

:scale(xs, ys, zs)

xs, ys, zs - numbers.

Scales all objects in the plot in x, y, and z direction for the factors of xs, ys, and zs.

:toglobal(w, h, x, y, z)

w - a number to sepcify the scene width.
h - a number to specify the scene height.
x, y, z - numbers to specify the position in the plot coordinate system.

Converts x, y, and z in the plot coordinate system to those in the global coordinate system.

:toglobal(w, h, arr)

w - a number to sepcify the scene width.
h - a number to specify the scene height.
arr - a zeArray of double floating type containing x, y, and z.

Converts x, y, and z in the first three vectors of the array from plot coordinates to global coordinates.

:toplot(w, h, x, y, z)

w - a number to sepcify the scene width.
h - a number to specify the scene height.
x, y, z - numbers to specify the position in the plot coordinate system.

Converts x, y, and z in the global coordinate system to those in the plot coordinate system.

:toplot(w, h, arr)

w - a number to sepcify the scene width.
h - a number to specify the scene height.
arr - a zeArray of double floating type containing x, y, and z.

Converts x, y, and z in the first three vectors of the array from global coordinates to plot coordinates.

:set(table)

table - a Lua table.

Sets axis properties of the plot. Valid key-value paris are listed in the table.

Key Value Type Remark
axis x, y, or z string Specifies setting properties of the x-, y-, or z-axis. Each call to set() function must contain this key-value pair.
color {r, g, b, a} Numbers (0 to 1) in table Sets axis color components of read, green, blue, and alpha.
label name string Sets axis label.
linewidth width Number (>0) Set axis and tick line width.
offset {xoff, yoff, zoff} Numbers in table Sets axis position off from the center.
range {min, max} Numbers in table Sets the minimum and maximum that the axis represents.
ticklenth scale Number (>0) Scales the tick length.
ticklabels {names, center} String and Boolean in table. Customizes tick labels. individual labels are separated by character |, e.g., "1991|1992|1993|1994". If center is true, labels will be positioned between major ticks.
tickdigit {digit, sci} Number and Boolean in table Sets tick number format, i.e, the number of digits and whether or not to use scientific notation.
tickmark {start, step, minor} Numbers in table Sets tick marks, i.e., the start of the first major tick, the step and the number of minor ticks between major ticks.
smooth flag Boolean Renders smooth (antialias) lines. Blending should be used in the scene for this to work.
showlabels flag Boolean Shows or hides labels
showticks flag Boolean Shows or hides ticks. This will affect labels as well.
enable flag Boolean Enables or disables the object.