diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2019-06-05 20:56:15 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2019-06-05 20:56:15 (GMT) |
commit | 10be2d85ae114d9e0e34eb438f49fbe54ea17779 (patch) | |
tree | 3e6b395d564232570132fd92518f94ef430e97c9 | |
parent | 6b702c4ddb91ac7b56b755b9e949d435cd1d19cb (diff) | |
download | blt-10be2d85ae114d9e0e34eb438f49fbe54ea17779.zip blt-10be2d85ae114d9e0e34eb438f49fbe54ea17779.tar.gz blt-10be2d85ae114d9e0e34eb438f49fbe54ea17779.tar.bz2 |
add multiple plot support
-rw-r--r-- | ds9/library/markeranalysishist.tcl | 2 | ||||
-rw-r--r-- | ds9/library/markeranalysisplot2d.tcl | 2 | ||||
-rw-r--r-- | ds9/library/markeranalysisplot3d.tcl | 2 | ||||
-rw-r--r-- | ds9/library/markeranalysisradial.tcl | 2 | ||||
-rw-r--r-- | ds9/library/plot.tcl | 12 | ||||
-rw-r--r-- | ds9/library/plotconfig.tcl | 4 | ||||
-rw-r--r-- | ds9/library/plotdata.tcl | 15 | ||||
-rw-r--r-- | ds9/library/plotstate.tcl | 5 |
8 files changed, 12 insertions, 32 deletions
diff --git a/ds9/library/markeranalysishist.tcl b/ds9/library/markeranalysishist.tcl index e945e26..5aa5dbf 100644 --- a/ds9/library/markeranalysishist.tcl +++ b/ds9/library/markeranalysishist.tcl @@ -82,7 +82,7 @@ proc MarkerAnalysisHistogramCB {frame id} { set cc $vvar(graph,current) - set vvar($cc,manage) 0 + set vvar(graph,ds,manage) 0 set vvar(graph,ds,dim) xy set vvar(graph,ds,xdata) $xdata set vvar(graph,ds,ydata) $ydata diff --git a/ds9/library/markeranalysisplot2d.tcl b/ds9/library/markeranalysisplot2d.tcl index 4c1deb4..58abb12 100644 --- a/ds9/library/markeranalysisplot2d.tcl +++ b/ds9/library/markeranalysisplot2d.tcl @@ -171,7 +171,7 @@ proc MarkerAnalysisPlot2dCB {frame id} { set cc $vvar(graph,current) - set vvar($cc,manage) 0 + set vvar(graph,ds,manage) 0 set vvar(graph,ds,dim) xy set vvar(graph,ds,xdata) $xdata set vvar(graph,ds,ydata) $ydata diff --git a/ds9/library/markeranalysisplot3d.tcl b/ds9/library/markeranalysisplot3d.tcl index 244e666..8ab1e55 100644 --- a/ds9/library/markeranalysisplot3d.tcl +++ b/ds9/library/markeranalysisplot3d.tcl @@ -176,7 +176,7 @@ proc MarkerAnalysisPlot3dCB {frame id} { set cc $vvar(graph,current) - set vvar($cc,manage) 0 + set vvar(graph,ds,manage) 0 set vvar(graph,ds,dim) xy set vvar(graph,ds,xdata) $xdata set vvar(graph,ds,ydata) $ydata diff --git a/ds9/library/markeranalysisradial.tcl b/ds9/library/markeranalysisradial.tcl index 6c5d506..0507735 100644 --- a/ds9/library/markeranalysisradial.tcl +++ b/ds9/library/markeranalysisradial.tcl @@ -109,7 +109,7 @@ proc MarkerAnalysisRadialCB {frame id} { set cc $vvar(graph,current) - set vvar($cc,manage) 0 + set vvar(graph,ds,manage) 0 set vvar(graph,ds,dim) xyey set vvar(graph,ds,xdata) $xdata set vvar(graph,ds,ydata) $ydata diff --git a/ds9/library/plot.tcl b/ds9/library/plot.tcl index bdcb8c2..71a9b42 100644 --- a/ds9/library/plot.tcl +++ b/ds9/library/plot.tcl @@ -217,10 +217,7 @@ proc PlotCurrentData {varname} { if {$var($cc,data,total) > 0} { set nn $var($cc,data,current) - - set var($cc,manage) $var($cc,$nn,manage) - - PlotRestoreState $varname $nn + PlotRestoreState $varname } PlotStats $varname @@ -310,10 +307,9 @@ proc PlotExternal {varname} { set nn $var($cc,data,total) set var($cc,data,current) $nn + set var(graph,ds,manage) 0 set var(graph,ds,name) "Dataset $nn" - set var($cc,$nn,manage) $var($cc,manage) - PlotSaveState $varname # update data set menu @@ -342,8 +338,6 @@ proc PlotListGenerate {varname} { upvar #0 $varname var global $varname - set cc $var(graph,current) - set rr {} if {$var(graph,ds,xdata) != {}} { global $var(graph,ds,xdata) $var(graph,ds,ydata) \ @@ -430,8 +424,6 @@ proc PlotStatsGenerate {varname} { upvar #0 $varname var global $varname - set cc $var(graph,current) - set min {} set max {} set mean {} diff --git a/ds9/library/plotconfig.tcl b/ds9/library/plotconfig.tcl index 4755d93..b64e5dc 100644 --- a/ds9/library/plotconfig.tcl +++ b/ds9/library/plotconfig.tcl @@ -16,8 +16,6 @@ proc PlotLoadConfigFile {varname filename} { upvar #0 $varname var global $varname - set cc $var(graph,current) - if {$filename == {}} { return } @@ -197,8 +195,6 @@ proc PlotSaveConfigFile {varname filename} { upvar #0 $varname var global $varname - set cc $var(graph,current) - if {$filename == {}} { return } diff --git a/ds9/library/plotdata.tcl b/ds9/library/plotdata.tcl index ea380af..5ab66e7 100644 --- a/ds9/library/plotdata.tcl +++ b/ds9/library/plotdata.tcl @@ -8,8 +8,6 @@ proc PlotDataSet {varname dim data} { upvar #0 $varname var global $varname - set cc $var(graph,current) - switch -- $dim { 4 { # first data set @@ -83,7 +81,7 @@ proc PlotDataSetOne {varname dim data} { set yedata ap${varname}graph${cc}ye${nn} # basics - set var($cc,manage) 1 + set var(graph,ds,manage) 1 set var(graph,ds,name) "Dataset $nn" # vectors @@ -235,8 +233,6 @@ proc PlotDataSetOne {varname dim data} { } } - set var($cc,$nn,manage) 1 - PlotSaveState $varname # update data set menu @@ -324,10 +320,7 @@ proc PlotDupData {varname mm} { # make current set var($cc,data,current) $nn - - set var($cc,manage) $var($cc,$nn,manage) - - PlotRestoreState $varname $nn + PlotRestoreState $varname PlotAddData $varname $var(proc,updateelement) $varname @@ -370,8 +363,6 @@ proc PlotSaveData {varname} { upvar #0 $varname var global $varname - set cc $var(graph,current) - if {$var(graph,ds,xdata) == {}} { return } @@ -383,8 +374,6 @@ proc PlotSaveDataFile {varname filename} { upvar #0 $varname var global $varname - set cc $var(graph,current) - if {$var(graph,ds,xdata) == {}} { return } diff --git a/ds9/library/plotstate.tcl b/ds9/library/plotstate.tcl index f511d07..2b9cf53 100644 --- a/ds9/library/plotstate.tcl +++ b/ds9/library/plotstate.tcl @@ -114,6 +114,7 @@ proc PlotInitGraph {varname} { # per DataSet set var(graph,ds,dim) xy + set var(graph,ds,manage) 1 set var(graph,ds,xdata) {} set var(graph,ds,ydata) {} @@ -175,6 +176,7 @@ proc PlotSaveState {varname} { # per DataSet set var($cc,$nn,dim) $var(graph,ds,dim) + set var($cc,$nn,manage) $var(graph,ds,manage) set var($cc,$nn,xdata) $var(graph,ds,xdata) set var($cc,$nn,ydata) $var(graph,ds,ydata) @@ -202,7 +204,7 @@ proc PlotSaveState {varname} { set var($cc,$nn,bar,relief) $var(graph,ds,bar,relief) } -proc PlotRestoreState {varname nn} { +proc PlotRestoreState {varname} { upvar #0 $varname var global $varname @@ -236,6 +238,7 @@ proc PlotRestoreState {varname nn} { # per DataSet set var(graph,ds,dim) $var($cc,$nn,dim) + set var(graph,ds,manage) $var($cc,$nn,manage) set var(graph,ds,xdata) $var($cc,$nn,xdata) set var(graph,ds,ydata) $var($cc,$nn,ydata) |