File: test-histogram.tcl

package info (click to toggle)
tklib 0.6%2B20190108-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 15,008 kB
  • sloc: tcl: 75,757; sh: 5,789; ansic: 792; pascal: 359; makefile: 70; sed: 53; exp: 21
file content (19 lines) | stat: -rwxr-xr-x 470 bytes parent folder | download | duplicates (3)
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