Version 5 of playing BLT

Updated 2005-11-24 03:08:04

JM The following examples show the basic usage of the BLT charting capabilities.

As many of the BLT users will notice, these examples just show the tip of the iceberg, but sometimes we are looking for the minimal example for a quick startup...


Example 1 Barchart Basic Usage

 package require BLT
 blt::barchart .g -title "Comparison"
 pack .g
 .g element create BT1 -xdata {1 2 3 4 5 6 7 8} -ydata {.76 .98 .88 .92 .96 .98 .91 .80} -label {Series 1}\
 -showvalues y

Example 2 Barchart Showing 2 series of data

 package require BLT
 blt::barchart .g -title "Comparison" -barmode aligned
 pack .g
 .g element create BT1 -xdata {1 2 3 4 5 6 7 8} -ydata {.76 .98 .88 .92 .96 .98 .91 .80} -label {Series 1}\
 -showvalues y
 .g element create BT2 -xdata {1 2 3 4 5 6 7 8} -ydata {.1 .2 .3 .4 .5 .6 .7 .8} -label {Series 2}\
 -showvalues y -foreground red

Category BLT