| Description: |
local designation of the time in the axes
Changes:
in all FILES (2 files, 4 places) where gmt is also used add locale, i.e. in
plotaxis.tcl
proc ::Plotchart::DrawXaxis
set gmt 0
set locale {}
proc ::Plotchart::DrawXaxis
-gmt {
set gmt $val
}
-locale {
set locale $val
}
set xlabel [clock format [expr {int($xt)}] -format $timeformat -gmt $gmt -locale $locale]
plotchart.tcl
proc ::Plotchart::CreateXYPlotImpl
-gmt {
lappend known_args $arg $val
}
-locale {
lappend known_args $arg $val
}
#Example
package require Plotchart
pack [canvas .c -width 500 -bg white]
set start [clock scan "0:00"]
set stop [clock scan "10:00"]
set s [Plotchart::createStripchart .c [list $start $stop 7200] {0 10 1} -timeformat "%a %H:%M" -locale de]
foreach {x y} {0 0 2 5 5 2 9 9 12 10} {
set x [expr {$start + 3600 * $x}] ;# Convert hour to clock seconds
$s plot a $x $y
}
|