diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2019-07-16 20:36:18 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2019-07-16 20:36:18 (GMT) |
commit | ceacb55ce91d7419ebb7b78e3c0c009172b22e8a (patch) | |
tree | 443ee1c50c31ef2e60181dadff16e3069cfbfeda /ds9 | |
parent | 518f4aeb523afbe22b8830e848b7b4b3b1e421c3 (diff) | |
download | blt-ceacb55ce91d7419ebb7b78e3c0c009172b22e8a.zip blt-ceacb55ce91d7419ebb7b78e3c0c009172b22e8a.tar.gz blt-ceacb55ce91d7419ebb7b78e3c0c009172b22e8a.tar.bz2 |
support multiple graphs per plot
Diffstat (limited to 'ds9')
-rw-r--r-- | ds9/library/catplot.tcl | 4 | ||||
-rw-r--r-- | ds9/library/plot.tcl | 9 | ||||
-rw-r--r-- | ds9/library/plotbar.tcl | 8 | ||||
-rw-r--r-- | ds9/library/plotdialog.tcl | 4 | ||||
-rw-r--r-- | ds9/library/plotline.tcl | 8 | ||||
-rw-r--r-- | ds9/library/plotscatter.tcl | 8 |
6 files changed, 24 insertions, 17 deletions
diff --git a/ds9/library/catplot.tcl b/ds9/library/catplot.tcl index 629e779..8c0474f 100644 --- a/ds9/library/catplot.tcl +++ b/ds9/library/catplot.tcl @@ -76,7 +76,7 @@ proc CATPlotGenerate {varname} { set ping [PlotPing $vvarname] if {!$ping} { - PlotScatterDialog $vvarname $var(title) {} {} {} + PlotScatterDialog $vvarname $var(title) $var(title) $xtitle $ytitle set vvar(mode) pointer PlotChangeMode $vvarname @@ -86,7 +86,7 @@ proc CATPlotGenerate {varname} { set var(plot,var) $vvarname } - PlotTitle $vvarname $var(title) $xtitle $ytitle +# PlotTitle $vvarname $var(title) $xtitle $ytitle PlotDeleteDataSetAll $vvarname PlotAddDataSet $vvarname $dim $rr PlotStats $vvarname diff --git a/ds9/library/plot.tcl b/ds9/library/plot.tcl index 62afc08..5a4408e 100644 --- a/ds9/library/plot.tcl +++ b/ds9/library/plot.tcl @@ -692,15 +692,6 @@ proc PlotColorMenu {w varname color cmd} { -command [list ColorMenuOther $varname $color $cmd] } -proc PlotTitle {varname title xaxis yaxis} { - upvar #0 $varname var - global $varname - - set var(graph,title) "$title" - set var(graph,axis,x,title) "$xaxis" - set var(graph,axis,y,title) "$yaxis" -} - proc PlotBackup {ch dir} { global iap diff --git a/ds9/library/plotbar.tcl b/ds9/library/plotbar.tcl index 8db519c..580039b 100644 --- a/ds9/library/plotbar.tcl +++ b/ds9/library/plotbar.tcl @@ -58,9 +58,15 @@ proc PlotBarDialog {varname wtt title xaxis yaxis} { set var(proc,highlite) PlotHighliteElement set var(proc,button) PlotButton - PlotDialog $varname $wtt $title $xaxis $yaxis + PlotDialog $varname $wtt PlotAddGraph $varname + set var(graph,title) "$title" + set var(graph,axis,x,title) "$xaxis" + set var(graph,axis,y,title) "$yaxis" + + $var(proc,updategraph) $varname + # Graph $var(mb).graph add separator $var(mb).graph add cascade -label "[msgcat::mc {Mode}]..." \ diff --git a/ds9/library/plotdialog.tcl b/ds9/library/plotdialog.tcl index 242d9c6..344e19e 100644 --- a/ds9/library/plotdialog.tcl +++ b/ds9/library/plotdialog.tcl @@ -4,7 +4,7 @@ package provide DS9 1.0 -proc PlotDialog {varname wtt title xaxis yaxis} { +proc PlotDialog {varname wtt} { upvar #0 $varname var global $varname @@ -32,8 +32,6 @@ proc PlotDialog {varname wtt title xaxis yaxis} { array set $varname [array get pap] - PlotTitle $varname $title $xaxis $yaxis - # create window Toplevel $var(top) $var(mb) 7 $wtt [list PlotDestroy $varname] diff --git a/ds9/library/plotline.tcl b/ds9/library/plotline.tcl index a03f2d6..7ddc70b 100644 --- a/ds9/library/plotline.tcl +++ b/ds9/library/plotline.tcl @@ -58,9 +58,15 @@ proc PlotLineDialog {varname wtt title xaxis yaxis} { set var(proc,highlite) PlotHighliteElement set var(proc,button) PlotButton - PlotDialog $varname $wtt $title $xaxis $yaxis + PlotDialog $varname $wtt PlotAddGraph $varname + set var(graph,title) "$title" + set var(graph,axis,x,title) "$xaxis" + set var(graph,axis,y,title) "$yaxis" + + $var(proc,updategraph) $varname + # Data $var(mb).data add checkbutton -label [msgcat::mc {Show}] \ -variable ${varname}(graph,ds,show) \ diff --git a/ds9/library/plotscatter.tcl b/ds9/library/plotscatter.tcl index 5496235..2291265 100644 --- a/ds9/library/plotscatter.tcl +++ b/ds9/library/plotscatter.tcl @@ -58,9 +58,15 @@ proc PlotScatterDialog {varname wtt title xaxis yaxis} { set var(proc,highlite) PlotScatterHighliteElement set var(proc,button) PlotScatterButton - PlotDialog $varname $wtt $title $xaxis $yaxis + PlotDialog $varname $wtt PlotAddGraph $varname + set var(graph,title) "$title" + set var(graph,axis,x,title) "$xaxis" + set var(graph,axis,y,title) "$yaxis" + + $var(proc,updategraph) $varname + # Data $var(mb).data add checkbutton -label [msgcat::mc {Show}] \ -variable ${varname}(graph,ds,show) \ |