Graphing items

The Slate includes a number of item types that assist the construction of graphs (of the x-versusy kind, not the vertices-and-edges kind). The Slate is by no means the fastest way of drawing graphs ([incr Tcl] is fully interpreted and the Slate adds a fair amount of overhead), but it's still very handy for rapid prototyping.

Axis

Axis is an "axis" of a graph. It has the following options The coordinates of the Axis are the x and y positions of the axis origin.

Enhancements: (i) The Axis needs a -orientation option with values horizontal and vertical. (ii) There is no way to control the spacing between tick marks -- one of these days, this might be useful. (iii) We should be able to select which side of the axis the tick marks appear on.

Example: Create an axis:

  source $tycho/editors/slate/doc/internals/newslate.itcl
  $slate create Axis 20 60 -digits 1 -from 0 -to 2 \
		-length 320 -tags moveable

Strip

Strip is a strip of colored boxes, as used in things like bar charts and Gantt charts (which is why we're implementing it). Because, however, the current code is very flaky, we have not included it in this release.

Back up
Tycho Home Page


Copyright © 1996, The Regents of the University of California. All rights reserved.
Last updated: 96/12/11, comments to: johnr@eecs.berkeley.edu