Name

graph

graph pathName [option value...]stripchart pathName [option value...]barchart pathName [option value...]

BLT supports three types of charts with the graph, stripchart, and barchart commands. The methods and options for each of these widgets are nearly identical; therefore, all three are described here with the differences noted as appropriate.

The graph command creates a new graph widget named pathName for plotting two-dimensional data (x- and y-coordinates) using symbols and/or connecting lines. A graph widget is composed of several components: coordinate axes, data elements, a legend, a grid, crosshairs, pens, a PostScript generator, and annotation markers. Methods exist for creating (if necessary) and manipulating each of these components.

The stripchart command creates a new strip chart widget named pathName. A strip chart widget is almost exactly the same as a graph widget except that the x-axis typically refers to time points and has better support for maintaining a view of recent data. The primary difference is support for the -autorange and -shiftby axis options.

The barchart command creates a new bar chart widget named pathName. A bar chart widget is essentially the same as a graph widget except that vertical bars are used to represent the data rather than symbols and lines. Therefore the bar chart has very different element and pen configuration options. It also supports the additions to the axis configuration used by the strip chart to handle dynamic data.

Any number ...

Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.