File: test-spiralpie.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 (26 lines) | stat: -rwxr-xr-x 763 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
23
24
25
26
#! /usr/bin/env tclsh
## -*- tcl -*-

# test-spiralpie.tcl --
#
# Options:
# -shownumbers
# -sorted
#
package require Plotchart

pack [canvas .c1 -width 300 -height 300] \
     [canvas .c2 -width 300 -height 300]

::Plotchart::plotstyle configure default spiralpie labels sorted      1 \
                                         spiralpie labels shownumbers 1 \
                                         spiralpie labels formatright "(%g) %s" \
                                         piechart  labels sorted      1 \
                                         piechart  labels shownumbers 1


set p1 [::Plotchart::createSpiralPie .c1]
set p2 [::Plotchart::createPiechart  .c2]

$p1 plot {Red 10 Green 3 Blue 5 Yellow 15}
$p2 plot {Red 10 Green 3 Blue 5 Yellow 15}