diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2019-06-07 20:12:32 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2019-06-07 20:12:32 (GMT) |
commit | 8b5b3fe3a51503a7d8cff1b2eab3bc6faddbc2a4 (patch) | |
tree | 2ffdc1db25e4e172a9ea26c3740c37400198f51d | |
parent | 8089027d323727dc920045a7b3040daa33c14f4c (diff) | |
download | blt-8b5b3fe3a51503a7d8cff1b2eab3bc6faddbc2a4.zip blt-8b5b3fe3a51503a7d8cff1b2eab3bc6faddbc2a4.tar.gz blt-8b5b3fe3a51503a7d8cff1b2eab3bc6faddbc2a4.tar.bz2 |
support multiple graphs per plot
-rw-r--r-- | ds9/library/plot.tcl | 18 | ||||
-rw-r--r-- | ds9/library/plotdata.tcl | 2 | ||||
-rw-r--r-- | ds9/library/plotprocess.tcl | 2 |
3 files changed, 15 insertions, 7 deletions
diff --git a/ds9/library/plot.tcl b/ds9/library/plot.tcl index 1d91250..8ed5dc0 100644 --- a/ds9/library/plot.tcl +++ b/ds9/library/plot.tcl @@ -53,7 +53,7 @@ proc PlotAddGraph {varname} { # update select graph menu $var(mb).canvas.select add radiobutton -label "Graph $var(seq)" \ -variable ${varname}(graph,current) -value $cc \ - -command [list PlotCurrent $varname] + -command [list PlotCurrentGraph $varname] # layout foreach cc $var(graphs) { @@ -115,12 +115,20 @@ proc PlotAddElement {varname} { # update select dataset menu $var(mb).graph.select add radiobutton -label "$var(graph,ds,name)" \ -variable ${varname}($cc,data,current) -value $nn \ - -command [list PlotCurrent $varname] + -command [list PlotCurrentDataSet $varname] $var(proc,updateelement) $varname } -proc PlotCurrent {varname} { +proc PlotCurrentGraph {varname} { + upvar #0 $varname var + global $varname + + PlotRestoreState $varname + PlotCurrentDataSet $varname +} + +proc PlotCurrentDataSet {varname} { upvar #0 $varname var global $varname @@ -532,7 +540,7 @@ proc PlotBackup {ch dir} { set save $var($cc,data,current) for {set ii 1} {$ii<=$var($cc,data,total)} {incr ii} { set ${varname}($cc,data,current) $ii - PlotCurrent $varname + PlotCurrentDataSet $varname PlotSaveDataFile $varname "$fdir/plot$ii.dat" PlotSaveConfigFile $varname "$fdir/plot$ii.plt" @@ -541,7 +549,7 @@ proc PlotBackup {ch dir} { puts $ch "PlotLoadConfigFile $varname $fdir/plot$ii.plt" } set ${varname}($cc,data,current) $save - PlotCurrent $varname + PlotCurrentDataSet $varname } } } diff --git a/ds9/library/plotdata.tcl b/ds9/library/plotdata.tcl index b4c9598..5a7bb07 100644 --- a/ds9/library/plotdata.tcl +++ b/ds9/library/plotdata.tcl @@ -518,7 +518,7 @@ proc PlotDeleteAllDataSet {varname} { set var($cc,data,current) 1 $var(mb).graph.select delete [expr $ds9(menu,start)+1] end - PlotCurrent $varname + PlotCurrentDataSet $varname $var(proc,updategraph) $varname } } diff --git a/ds9/library/plotprocess.tcl b/ds9/library/plotprocess.tcl index 42c883d..85099c1 100644 --- a/ds9/library/plotprocess.tcl +++ b/ds9/library/plotprocess.tcl @@ -341,7 +341,7 @@ proc PlotCmdSelectData {which} { set cc $cvar(graph,current) set cvar($cc,data,current) $which - PlotCurrent $cvarname + PlotCurrentDataSet $cvarname } # used by SAMP and CATALOG |