Re: Scaling Stripcharts

Juergen Schoenwaelder (schoenw@cs.utwente.nl)
Tue, 11 Feb 1997 10:57:38 +0100

Dave Hayes <dave@kachina.jetcafe.org> said:

Dave> 1) I'd like to know why scaling doesn't work. It's probably a simple
Dave> thing, but:

Dave> proc "Scale Selected Graphs" { list } {
Dave> set result [ined request "Set Scale Factor" \
Dave> [list [list "Scale factor:" 100 scale 1 10000] ] \
Dave> [list "set values" cancel] ]

Dave> if {[lindex $result 0] == "cancel"} return
Dave> set scalefactor [lindex $result 1]

Dave> foreach id $list {
Dave> puts "ID: $id"
Dave> puts "ScaleB4: [ined -noupdate scale $id]"
Dave> ined -noupdate scale $id $scalefactor
Dave> puts "ScaleNu: [ined -noupdate scale $id]"
Dave> }
Dave> }

You should change the foreach loop so that it extracts the handle for
the object from the list that describes an object. Change it to:

foreach comp $list {
set id [ined id $comp]
ined -noupdate scale $id $scalefactor
}

And everything will work just fine.

Dave> 2) I'd like to make stripcharts display the line in a different color
Dave> above a certain height (cool multicolor stripcharts). Am I correct
Dave> in assuming that it would just take modifying DisplayStripchart() in
Dave> tkiStripChart.c (plus a new GC for the color)?

You probably also have to change FillStripchart. You will know once
you start modifying the code. ;-)
Juergen

-- 
Juergen Schoenwaelder schoenw@cs.utwente.nl http://www.cs.utwente.nl/~schoenw
Computer Science Department, University of Twente,   (Fax: +31-53-489-3247)
P.O. Box 217, NL-7500 AE Enschede, The Netherlands.  (Tel. +31-53-489-3678)
--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.