1#! /bin/sh 2# -*- tcl -*- \ 3exec tclsh "$0" ${1+"$@"} 4 5package require Tcl 8.4 6package require Tk 7 8package require Plotchart 9 10 11# plotdemos8.tcl -- 12# Demonstration of a boxplot 13# 14pack [canvas .c] -fill both -side top 15 16set p [::Plotchart::createBoxplot .c {0 40 5} {A B C D E F}] 17 18$p plot A {0 1 2 5 7 1 4 5 0.6 5 5.5} 19$p plot C {2 2 3 6 1.5 3} 20 21$p plot E {2 3 3 4 7 8 9 9 10 10 11 11 11 14 15 17 17 20 24 29} 22 23# 24# Demonstration of selected x labels - for version 1.6.2 25# 26if {0} { 27set s [::Plotchart::createXYPlot .c2 {1990 2050 {}} {0.0 100.0 20.0} \ 28 -xlabels {1990 2020 2030 2050}] 29 30$s xconfig -format "%.0f" 31 32foreach {x y} {1990 32.0 2025 50.0 2030 60.0 2050 11.0 } { 33 $s plot series1 $x $y 34} 35 36$s title "Data series" 37} 38