#!/bin/sh # # Beispiel für Math::calculus und Plotchart # \ exec wish $0 $@ set dateiname [file join daten juli.dat] set fd [ open $dateiname] set daten {} set min 0 set max 0 set zeile {} while { [gets $fd line] >= 0 } { foreach {sekunden wasserstand} $line {} if {$wasserstand < $min} { set min $wasserstand } if {$wasserstand > $max} { set max $wasserstand } lappend zeile $wasserstand if {[llength $zeile] == 24} { lappend daten $zeile set zeile {} } } puts $min puts $max # # Ausgabe mit Plotchart # package require Plotchart canvas .c -background white -width 400 -height 600 pack .c -fill both set 3DDia [::Plotchart::create3DPlot .c {0.0 24 1} {1 30 1} [list -0.5 10 0.5]] $3DDia colour seagreen black $3DDia plotdata $daten .c scale all 0 0 3 1.0 .c create text 100 220 -text "Wasserstand" .c create text 500 590 -text "Tag" .c create text 980 500 -text "Uhrzeit"