File: testxypie.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 (22 lines) | stat: -rwxr-xr-x 724 bytes parent folder | download
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}