File: test_ternary.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 (30 lines) | stat: -rw-r--r-- 678 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
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env tclsh
## -*- tcl -*-

package require Tk

# test_ternary.tcl --
#     Test the ternary diagram
#
package require Plotchart

pack [canvas .c -width 500 -height 500]
set p1 [::Plotchart::createTernaryDiagram .c]

$p1 text "Component A"  "Component B"  "Component C"

$p1 plot data 50.0 25.0 25.0 "1"
$p1 plot data 20.0 25.0 55.0 "2"

$p1 line data { 0.0 80.0 20.0 \
               10.0 20.0 70.0 }

$p1 dataconfig area -colour green -smooth 1
$p1 fill area { 0.0 70.0  30.0 \
               10.0 20.0  70.0 \
                0.0  0.0 100.0 }
$p1 plot area1  0.0 70.0  30.0  ""
$p1 plot area1 10.0 20.0  70.0 ""
$p1 plot area1  0.0  0.0 100.0 ""

$p1 ticklines grey