File: test-histogram.tcl

package info (click to toggle)
tklib 0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 23,156 kB
  • sloc: tcl: 105,088; sh: 2,573; ansic: 792; pascal: 359; makefile: 69; sed: 53; exp: 21
file content (19 lines) | stat: -rwxr-xr-x 471 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /usr/bin/env tclsh
## -*- tcl -*-
# test-histogram.tcl --
#     Example of a histogram plot with filled background
#
package require Plotchart

pack [canvas .c -width 400 -height 300 -bg white]

set p [::Plotchart::createHistogram .c {0 100 20} {0 50 10}]

$p dataconfig data -style filled -fillcolour cyan -width 2 -colour blue

$p plot data 0.0  10.0
$p plot data 20.0 10.0
$p plot data 40.0  3.0
$p plot data 45.0  6.0
$p plot data 55.0 26.0
$p plot data 67.0 24.0