File: test-histogram.tcl

package info (click to toggle)
tklib 0.6-1%2Bdeb8u1
  • links: PTS
  • area: main
  • in suites: jessie
  • size: 16,112 kB
  • ctags: 4,008
  • sloc: tcl: 65,204; sh: 6,870; ansic: 792; pascal: 359; makefile: 73; exp: 21; sed: 16
file content (18 lines) | stat: -rwxr-xr-x 455 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# test-histogram.tcl --
#     Example of a histogram plot with filled background
#
source plotchart.tcl
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