diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2019-05-31 17:24:14 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2019-05-31 17:24:14 (GMT) |
commit | 1dcf4d5e0309b72a2f4e2699cfe77028ca5bfd12 (patch) | |
tree | 9bdaa8004cd4469f66b77857307d05862fda73ac | |
parent | 57243040122134c83462bc4f163ce1b523dde143 (diff) | |
download | blt-1dcf4d5e0309b72a2f4e2699cfe77028ca5bfd12.zip blt-1dcf4d5e0309b72a2f4e2699cfe77028ca5bfd12.tar.gz blt-1dcf4d5e0309b72a2f4e2699cfe77028ca5bfd12.tar.bz2 |
add multiple plot support
-rw-r--r-- | ds9/library/plotprocess.tcl | 41 | ||||
-rw-r--r-- | ds9/library/plotstate.tcl | 32 | ||||
-rw-r--r-- | ds9/library/prefs.tcl | 39 |
3 files changed, 76 insertions, 36 deletions
diff --git a/ds9/library/plotprocess.tcl b/ds9/library/plotprocess.tcl index ba9044b..8c5d5a7 100644 --- a/ds9/library/plotprocess.tcl +++ b/ds9/library/plotprocess.tcl @@ -57,58 +57,61 @@ proc PrefsDialogPlot {} { set f [ttk::labelframe $w.plot.data -text [msgcat::mc {Dataset}]] # Show - ttk::checkbutton $f.show -text [msgcat::mc {Show}] -variable pap(show) + ttk::checkbutton $f.show -text [msgcat::mc {Show}] \ + -variable pap(graph,ds,show) grid $f.show -padx 2 -pady 2 -sticky w # Shape ttk::label $f.shapetitle -text [msgcat::mc {Shape}] - ttk::menubutton $f.shape -textvariable pap(shape,symbol) \ + ttk::menubutton $f.shape -textvariable pap(graph,ds,shape,symbol) \ -menu $f.shape.menu - PlotLineShapeMenu $f.shape.menu pap(shape,symbol) + PlotLineShapeMenu $f.shape.menu pap(graph,ds,shape,symbol) ttk::checkbutton $f.shapefill -text [msgcat::mc {Fill}] \ - -variable pap(shape,fill) - ColorMenuButton $f.shapecolor pap shape,color {} + -variable pap(graph,ds,shape,fill) + ColorMenuButton $f.shapecolor pap graph,ds,shape,color {} grid $f.shapetitle $f.shape $f.shapefill $f.shapecolor \ -padx 2 -pady 2 -sticky w # Smooth ttk::label $f.smoothtitle -text [msgcat::mc {Smooth}] - ttk::menubutton $f.smooth -textvariable pap(smooth) \ + ttk::menubutton $f.smooth -textvariable pap(graph,ds,smooth) \ -menu $f.smooth.menu menu $f.smooth.menu $f.smooth.menu add radiobutton -label [msgcat::mc {Step}] \ - -variable pap(smooth) -value step + -variable pap(graph,ds,smooth) -value step $f.smooth.menu add radiobutton -label [msgcat::mc {Linear}] \ - -variable pap(smooth) -value linear + -variable pap(graph,ds,smooth) -value linear $f.smooth.menu add radiobutton -label [msgcat::mc {Cubic}] \ - -variable pap(smooth) -value cubic + -variable pap(graph,ds,smooth) -value cubic $f.smooth.menu add radiobutton -label [msgcat::mc {Quadratic}] \ - -variable pap(smooth) -value quadratic + -variable pap(graph,ds,smooth) -value quadratic $f.smooth.menu add radiobutton -label [msgcat::mc {Catrom}] \ - -variable pap(smooth) -value catrom + -variable pap(graph,ds,smooth) -value catrom grid $f.smoothtitle $f.smooth -padx 2 -pady 2 -sticky w # Color ttk::label $f.colortitle -text [msgcat::mc {Color}] - ColorMenuButton $f.color pap color {} + ColorMenuButton $f.color pap graph,ds,color {} grid $f.colortitle $f.color -padx 2 -pady 2 -sticky w # Width ttk::label $f.widthtitle -text [msgcat::mc {Width}] - ttk::menubutton $f.width -textvariable pap(width) -menu $f.width.menu - WidthDashMenu $f.width.menu pap width dash {} {} + ttk::menubutton $f.width -textvariable pap(graph,ds,width) \ + -menu $f.width.menu + WidthDashMenu $f.width.menu pap graph,ds,width graph,ds,dash {} {} grid $f.widthtitle $f.width -padx 2 -pady 2 -sticky w # Error ttk::label $f.errortitle -text [msgcat::mc {Error}] ttk::checkbutton $f.error -text [msgcat::mc {Show}] \ - -variable pap(error) + -variable pap(graph,ds,error) ttk::checkbutton $f.errorcap -text [msgcat::mc {Cap}] \ - -variable pap(error,cap) - ColorMenuButton $f.errorcolor pap error,color {} - ttk::menubutton $f.errorwidth -textvariable pap(error,width) \ + -variable pap(graph,ds,error,cap) + ColorMenuButton $f.errorcolor pap graph,ds,error,color {} + ttk::menubutton $f.errorwidth -textvariable pap(graph,ds,error,width) \ -menu $f.errorwidth.menu - WidthDashMenu $f.errorwidth.menu pap width dash {} {} + WidthDashMenu $f.errorwidth.menu pap \ + graph,ds,error,width graph,ds,error,dash {} {} grid $f.errortitle $f.error $f.errorcap $f.errorcolor $f.errorwidth \ -padx 2 -pady 2 -sticky w diff --git a/ds9/library/plotstate.tcl b/ds9/library/plotstate.tcl index d9a4f21..19cee55 100644 --- a/ds9/library/plotstate.tcl +++ b/ds9/library/plotstate.tcl @@ -71,16 +71,16 @@ proc PlotDefState {} { set pap(graph,ds,width) 1 set pap(graph,ds,dash) 0 - set pap(shape,symbol) none - set pap(shape,fill) 1 - set pap(shape,color) red + set pap(graph,ds,shape,symbol) none + set pap(graph,ds,shape,fill) 1 + set pap(graph,ds,shape,color) red - set pap(error) 1 - set pap(error,cap) 0 - set pap(error,color) red - set pap(error,width) 1 + set pap(graph,ds,error) 1 + set pap(graph,ds,error,cap) 0 + set pap(graph,ds,error,color) red + set pap(graph,ds,error,width) 1 - set pap(bar,relief) raised + set pap(graph,ds,bar,relief) raised } proc PlotInitState {varname} { @@ -104,16 +104,16 @@ proc PlotInitState {varname} { set var(graph,ds,width) $pap(graph,ds,width) set var(graph,ds,dash) $pap(graph,ds,dash) - set var(graph,ds,shape,symbol) $pap(shape,symbol) - set var(graph,ds,shape,fill) $pap(shape,fill) - set var(graph,ds,shape,color) $pap(shape,color) + set var(graph,ds,shape,symbol) $pap(graph,ds,shape,symbol) + set var(graph,ds,shape,fill) $pap(graph,ds,shape,fill) + set var(graph,ds,shape,color) $pap(graph,ds,shape,color) - set var(graph,ds,error) $pap(error) - set var(graph,ds,error,cap) $pap(error,cap) - set var(graph,ds,error,color) $pap(error,color) - set var(graph,ds,error,width) $pap(error,width) + set var(graph,ds,error) $pap(graph,ds,error) + set var(graph,ds,error,cap) $pap(graph,ds,error,cap) + set var(graph,ds,error,color) $pap(graph,ds,error,color) + set var(graph,ds,error,width) $pap(graph,ds,error,width) - set var(graph,ds,bar,relief) $pap(bar,relief) + set var(graph,ds,bar,relief) $pap(graph,ds,bar,relief) } proc PlotSaveState {varname} { diff --git a/ds9/library/prefs.tcl b/ds9/library/prefs.tcl index fe6283d..8b24a73 100644 --- a/ds9/library/prefs.tcl +++ b/ds9/library/prefs.tcl @@ -464,6 +464,7 @@ proc FixPrefs {version} { FixPrefs7.3to7.4 FixPrefs7.4to7.5 FixPrefs7.5to7.6 + FixPrefs7.6to8.1 } 6.0 { FixPrefs6.0to6.1 @@ -475,6 +476,7 @@ proc FixPrefs {version} { FixPrefs7.3to7.4 FixPrefs7.4to7.5 FixPrefs7.5to7.6 + FixPrefs7.6to8.1 } 6.1 - 6.1.1 - @@ -487,6 +489,7 @@ proc FixPrefs {version} { FixPrefs7.3to7.4 FixPrefs7.4to7.5 FixPrefs7.5to7.6 + FixPrefs7.6to8.1 } 6.2 { FixPrefs6.2to7.0 @@ -496,6 +499,7 @@ proc FixPrefs {version} { FixPrefs7.3to7.4 FixPrefs7.4to7.5 FixPrefs7.5to7.6 + FixPrefs7.6to8.1 } 7.0 { FixPrefs7.0to7.1 @@ -504,6 +508,7 @@ proc FixPrefs {version} { FixPrefs7.3to7.4 FixPrefs7.4to7.5 FixPrefs7.5to7.6 + FixPrefs7.6to8.1 } 7.1 { FixPrefs7.1to7.2 @@ -511,12 +516,14 @@ proc FixPrefs {version} { FixPrefs7.3to7.4 FixPrefs7.4to7.5 FixPrefs7.5to7.6 + FixPrefs7.6to8.1 } 7.2 { FixPrefs7.2to7.3 FixPrefs7.3to7.4 FixPrefs7.4to7.5 FixPrefs7.5to7.6 + FixPrefs7.6to8.1 } 7.3 - 7.3.1 - @@ -524,18 +531,48 @@ proc FixPrefs {version} { FixPrefs7.3to7.4 FixPrefs7.4to7.5 FixPrefs7.5to7.6 + FixPrefs7.6to8.1 } 7.4 { FixPrefs7.4to7.5 FixPrefs7.5to7.6 + FixPrefs7.6to8.1 } 7.5 { FixPrefs7.5to7.6 + FixPrefs7.6to8.1 + } + 7.6 { + FixPrefs7.6to8.1 + } + 8.0 { + FixPrefs7.6to8.1 } - 7.6 {} } } +proc FixPrefs7.6to8.1 {} { + global pap + FixVar pap(graph,ds,show) pap(show) + FixVar pap(graph,ds,smooth) pap(smooth) + FixVar pap(graph,ds,color) pap(color) + FixVar pap(graph,ds,fill) pap(fill) + FixVar pap(graph,ds,fill,color) pap(fill,color) + FixVar pap(graph,ds,width) pap(width) + FixVar pap(graph,ds,dash) pap(dash) + + FixVar pap(graph,ds,shape,symbol) pap(shape,symbol) + FixVar pap(graph,ds,shape,fill) pap(shape,fill) + FixVar pap(graph,ds,shape,color) pap(shape,color) + + FixVar pap(graph,ds,error) pap(error) + FixVar pap(graph,ds,error,color) pap(error,color) + FixVar pap(graph,ds,error,width) pap(error,width) + FixVar pap(graph,ds,error,style) pap(error,style) + + FixVar pap(graph,ds,bar,relief) pap(relief) +} + proc FixPrefs7.5to7.6 {} { global smooth set smooth(radius,minor) $smooth(radius) |