::tycho::Picture
-
Source File -
Contents:
public procs
- public commons
- protected common
This class defines an axis object that can be used when creating graphs, tables, and other such things. The user must give the x and y coordinates (in pixels) of the ruler base for positioning on the slate. Options include specifying the length of the axis in pixels, the number of significant digits to use in labelling the axis, the labelling style (ie whether every increment should be labelled, or just the end points or no labels), orientation of the axis (horizontal or vertical), and the length of the tick marks in pixels. The beginning and end of the axis can also be specified using the -from and -to options.
FIXME: Needs lots more features. (We're working on it...)
Here is an example on how to use it:
::tycho::slate .s
pack .s
# Create the axis
set axis [.s create Axis 50 50 -length 100 -from 0.0 -to 100 -digits 1]
# Move the axis
$axis coords 10 100
# Change the length
$axis configure -length 50
Reading Picture documentation.
Note: This is an experimental class.
construct
id canvas slate tags x0 y0 args
_digits
id canvas slate digits
-digits
configuration option.
_from
id canvas slate from
-from
configuration option.
_length
id canvas slate length
-length
configuration option.
_ticklength
id canvas slate ticklength
-ticklength
configuration option.
_to
id canvas slate to
-to
configuration option.
coords
id canvas slate args
_digits
_from
_length
_ticklength
_to
methodtable
optiondefault
tickfont