|
zeAxis
Use .new("axis")
to create the object. It draws itself in the 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 view port; a y-axis from the bottom to the
top; and z-axis from, well, the minimum to the maximum of the global z-axis,
which is invisible without rotation transformation.
:font(obj)
obj - a zeFreetype object.
Assigns a font object to be used for generating text.
:fontsize(size)
size - font size.
Sets font size. The function should be called before
setting the axis and tick labels.
:set(table)
table - a Lua table.
Sets axis properties. Valid key-value paris are listed in the table.
Key |
Value |
Type |
Remark |
axis |
x, y, or z |
String |
Sets axis type. The argement 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. |
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, 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. |
tickmark |
{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 |
|