File: test-spiralpie.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 (26 lines) | stat: -rwxr-xr-x 762 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
#!/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}