close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Ticket #698: test_rbc.tcl

File test_rbc.tcl, 779 bytes (added by Jorge, 16 years ago)
Line 
1package require Toltcl
2
3lappend auto_path /usr/local/src/TCL/rbctoolkit/trunk/rbc/build8.5
4package require rbc
5
6proc Tol_HciWriter { msg } {
7  puts [ string trim $msg ]
8}
9
10tol::initkernel
11tol::initlibrary
12
13set cwd [ file normalize [ file dir [ info script ] ] ]
14
15rbc::graph .gr
16
17tol::include [ file join $cwd "test.tol" ]
18
19pack .gr -fill both -expand yes
20
21tol::seriegrp create s3 { Serie s3 }
22
23set j 0
24set t0 [ time {
25  foreach vec_data [ s3 serie 0 data ] {
26    .gr line create l$j -xdata [ lindex $vec_data 0 ] \
27        -ydata [ lindex $vec_data 1 ]
28    if { $j } {
29      .gr line configure l$j -label ""
30    } else {
31      .gr line configure l0 -label [ s3 serie 0 name ]
32    }
33    incr j
34  }
35} ]
36
37puts "la generacion del grafico tardo [ expr [ lindex $t0 0 ] * 1.0e-6 ] s"