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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
# Plwindow.tcl
# Vince Darley
# 1997-1998
# Geoffrey Furnish
# 9 May 1994
#
# @> [incr Tcl] interface to PLplot
#
# $Id: Plwindow.tcl 11659 2011-03-19 23:56:59Z airwin $
#
###############################################################################
option add *Plwindow.width 250 widgetDefault
option add *Plwindow.height 250 widgetDefault
package require Itk 3.0
package require Plplotter
#
# Usual options.
#
itk::usual Plwindow {
keep -background -cursor -foreground \
-plotbackground -xhairs -doublebuffer -width -height
}
itcl::class Plwindow {
inherit itk::Widget
constructor {args} {
itk_component add plwin {
plframe $itk_interior.plwin -relief sunken
} {
rename -background -plotbackground plotBackground Background
keep -width -height -xhairs -doublebuffer
}
grid $itk_component(plwin) -row 1 -column 0 -sticky nsew
grid rowconfigure $itk_interior 1 -weight 1 -minsize 0
eval itk_initialize $args
}
destructor {
}
method cmd {args} {
uplevel 1 $itk_interior.plwin cmd $args
}
method plcont {data clev} {
upvar $data d
upvar $clev c
cmd plcont d c
}
method plenv {xmin xmax ymin ymax just axis} {
cmd plenv $xmin $xmax $ymin $ymax $just $axis
}
method pllab {xlab ylab toplab} {
cmd pllab $xlab $ylab $toplab
}
method plline {n x y} {
cmd plline $n $x $y
}
method plpoin {n x y code} {
cmd plpoin $n $x $y $code
}
method plshade {data xmin xmax ymin ymax sh_min sh_max sh_col} {
cmd plshade $data $xmin $xmax $ymin $ymax \
$sh_min $sh_max 1 $sh_col
}
public variable name
}
|