diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2019-06-07 20:07:15 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2019-06-07 20:07:15 (GMT) |
commit | 8089027d323727dc920045a7b3040daa33c14f4c (patch) | |
tree | 1f3ccad255110f4b9be1ce1c00b770404f52afed | |
parent | 3e0e98282ec1f35833f975990cbd69a12843c475 (diff) | |
download | blt-8089027d323727dc920045a7b3040daa33c14f4c.zip blt-8089027d323727dc920045a7b3040daa33c14f4c.tar.gz blt-8089027d323727dc920045a7b3040daa33c14f4c.tar.bz2 |
support multiple graphs per plot
-rw-r--r-- | ds9/library/markeranalysishist.tcl | 4 | ||||
-rw-r--r-- | ds9/library/markeranalysisplot2d.tcl | 1 | ||||
-rw-r--r-- | ds9/library/markeranalysisplot3d.tcl | 1 | ||||
-rw-r--r-- | ds9/library/plot.tcl | 10 | ||||
-rw-r--r-- | ds9/library/plotdata.tcl | 7 | ||||
-rw-r--r-- | ds9/library/plotstate.tcl | 1 |
6 files changed, 7 insertions, 17 deletions
diff --git a/ds9/library/markeranalysishist.tcl b/ds9/library/markeranalysishist.tcl index cb0c0ac..c7ea2a5 100644 --- a/ds9/library/markeranalysishist.tcl +++ b/ds9/library/markeranalysishist.tcl @@ -90,11 +90,9 @@ proc MarkerAnalysisHistogramCB {frame id} { $frame get marker $id analysis histogram $xdata $ydata $vvar(nbins) if {!$ping} { - PlotExternal $vvarname set vvar(graph,ds,smooth) step set vvar(graph,ds,fill) 1 - - $vvar(proc,updateelement) $vvarname + PlotExternal $vvarname } PlotStats $vvarname diff --git a/ds9/library/markeranalysisplot2d.tcl b/ds9/library/markeranalysisplot2d.tcl index 08b1a74..f93b252 100644 --- a/ds9/library/markeranalysisplot2d.tcl +++ b/ds9/library/markeranalysisplot2d.tcl @@ -182,7 +182,6 @@ proc MarkerAnalysisPlot2dCB {frame id} { if {!$ping} { PlotExternal $vvarname - $vvar(proc,updateelement) $vvarname } PlotStats $vvarname diff --git a/ds9/library/markeranalysisplot3d.tcl b/ds9/library/markeranalysisplot3d.tcl index 6a0b04c..94f4c6c 100644 --- a/ds9/library/markeranalysisplot3d.tcl +++ b/ds9/library/markeranalysisplot3d.tcl @@ -189,7 +189,6 @@ proc MarkerAnalysisPlot3dCB {frame id} { if {!$ping} { PlotExternal $vvarname - $vvar(proc,updateelement) $vvarname } PlotStats $vvarname diff --git a/ds9/library/plot.tcl b/ds9/library/plot.tcl index 328a85a..1d91250 100644 --- a/ds9/library/plot.tcl +++ b/ds9/library/plot.tcl @@ -27,10 +27,6 @@ proc PlotAddGraph {varname} { global ds9 global pap - if {$var(graphs) != {}} { - PlotSaveState $varname - } - incr ${varname}(seq) set cc "graph$var(seq)" lappend var(graphs) $cc @@ -42,7 +38,6 @@ proc PlotAddGraph {varname} { $var(proc,addgraph) $varname PlotInitGraph $varname - PlotSaveState $varname $var(proc,updategraph) $varname $var(proc,updatecanvas) $varname @@ -121,6 +116,8 @@ proc PlotAddElement {varname} { $var(mb).graph.select add radiobutton -label "$var(graph,ds,name)" \ -variable ${varname}($cc,data,current) -value $nn \ -command [list PlotCurrent $varname] + + $var(proc,updateelement) $varname } proc PlotCurrent {varname} { @@ -218,7 +215,6 @@ proc PlotExternal {varname} { set var(graph,ds,manage) 0 set var(graph,ds,name) "Dataset $nn" - PlotSaveState $varname PlotAddElement $varname } @@ -366,6 +362,8 @@ proc PlotUpdateCanvas {varname} { global $varname global ds9 + PlotSaveState $varname + foreach cc $var(graphs) { $var($cc) configure -plotpadx 0 -plotpady 0 \ -font "{$ds9($var(graph,title,family))} $var(graph,title,size) $var(graph,title,weight) $var(graph,title,slant)" \ diff --git a/ds9/library/plotdata.tcl b/ds9/library/plotdata.tcl index 8b24ea8..b4c9598 100644 --- a/ds9/library/plotdata.tcl +++ b/ds9/library/plotdata.tcl @@ -33,9 +33,6 @@ proc PlotDataSetOne {varname dim data} { upvar #0 $varname var global $varname - # save current state - PlotSaveState $varname - set cc $var(graph,current) # look for no data @@ -231,9 +228,7 @@ proc PlotDataSetOne {varname dim data} { } } - PlotSaveState $varname PlotAddElement $varname - $var(proc,updateelement) $varname } proc PlotDupDataSet {varname mm} { @@ -308,8 +303,8 @@ proc PlotDupDataSet {varname mm} { # make current set var($cc,data,current) $nn PlotRestoreState $varname - PlotAddElement $varname + PlotStats $varname PlotList $varname } diff --git a/ds9/library/plotstate.tcl b/ds9/library/plotstate.tcl index 15c5579..95ce70d 100644 --- a/ds9/library/plotstate.tcl +++ b/ds9/library/plotstate.tcl @@ -155,6 +155,7 @@ proc PlotSaveState {varname} { set nn $var($cc,data,current) puts "PlotSaveState $cc" +# DumpCallStack # per Graph set var($cc,format) $var(graph,format) |