zeAxis
Use .new("axis")
to create the object. It draws itself in the full ranges of the global
coordinates if no scaling is apply to its host node, i.e., an x-axis will
draw from the left edge to the right edge of the viewport; a y-axis from
the bottom to the top; and a z-axis from, well, the minimum to the maximum
of the global z-axis, which is invisible without rotation transformation.
:font(obj)
Assigns the font object to be used for generating text.
:fontsize(size)
Sets the font size. The function should be called
before setting the axis and tick labels.
:set{...}
Sets axis properties with a Lua table. Valid key-value pairs in the
Lua table are listed as follows.
| Key |
Value |
Type |
Remark |
| axis |
x, y, or z |
String |
Sets axis type. The arguement is mandatory. |
| color |
{r, g, b, a} |
Numbers (0 to 1) in table |
Sets axis color in red, green, blue, and alpha. |
| label |
name |
String |
Sets axis label. |
| linewidth |
width |
Number (>0) |
Sets axis and tick line width. |
| offset |
{xoff, yoff, zoff} |
Numbers in table |
Offsets axis position from the center of the viewport in the global
coordinate system. |
| anchor |
{xf, yf, zf} |
Numbers in table |
Anchors an axis object in the global coordinate system. Values of
the x-, y-, and z-factors should be -1, 0, or 1. Zero mean no change
along that axis; 1 means to the positive end of that axis; and -1
means to the negative end of that axis. |
| range |
{min, max} |
Numbers in table |
Sets the minimum and maximum that the axis represents. |
| ticklength |
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, scientific} |
Number (>0) and Boolean in table |
Sets tick number format, i.e, the number of digits and whether or
not to use scientific notation. |
| tickmarks |
{start, step, minor} |
Numbers in table |
Sets tick marks, i.e., the start and step of the major tick, and
the number of minor ticks between major ticks. |
| smooth |
flag |
Boolean |
If true, 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 |
Enable (default) and disable the object |
|