File: testxypie.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 (22 lines) | stat: -rwxr-xr-x 723 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
#!/usr/bin/env tclsh
## -*- tcl -*-

# testxypie.tcl --
#     Test the combination of an xy-plot with two piecharts
#
package require Plotchart

pack [canvas .c -width 700 -height 500 -background grey]

set p1 [::Plotchart::createXYPlot    .c  {0.0 100.0 10.0} {0.0 20.0  5.0}]
set p2 [::Plotchart::createRightAxis $p1 {0.0 100.0 10.0}]
set p3 [::Plotchart::createPiechart  .c -reference [list $p1 70.0 15] -units {80 80}]

::Plotchart::plotstyle configure "default" piechart labels placement in

set p4 [::Plotchart::createPiechart  .c -reference [list $p1 20.0  5] -units {100 100}]

$p1 title "XY-plot with embedded piecharts"

$p3 plot {First 5 Second 6 Third 10 Fourth 2}
$p4 plot {First 5 Second 6 Third 10 Fourth 2}