summaryrefslogtreecommitdiffstats
path: root/ds9/library/plot.tcl
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2019-07-21 16:00:33 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2019-07-21 16:00:33 (GMT)
commite1a0f81dbfcd8f731d436b3ea1bf865bc9cb6b57 (patch)
tree3ff3d276246f4dcf8ca1c525d1a8ec61ba991339 /ds9/library/plot.tcl
parente0fea673f3b39d00beae3211c82fbd0309546bc8 (diff)
downloadblt-e1a0f81dbfcd8f731d436b3ea1bf865bc9cb6b57.zip
blt-e1a0f81dbfcd8f731d436b3ea1bf865bc9cb6b57.tar.gz
blt-e1a0f81dbfcd8f731d436b3ea1bf865bc9cb6b57.tar.bz2
support multiple graphs per plot
Diffstat (limited to 'ds9/library/plot.tcl')
-rw-r--r--ds9/library/plot.tcl26
1 files changed, 5 insertions, 21 deletions
diff --git a/ds9/library/plot.tcl b/ds9/library/plot.tcl
index ce1155e..6cf6d25 100644
--- a/ds9/library/plot.tcl
+++ b/ds9/library/plot.tcl
@@ -159,7 +159,7 @@ proc PlotAddGraph {varname} {
$var(proc,updategraph) $varname
$var(proc,updatecanvas) $varname
- PlotBuildDataSetMenu $varname
+ PlotUpdateDataSetMenu $varname
PlotStats $varname
PlotList $varname
@@ -235,7 +235,7 @@ proc PlotDeleteGraph {varname} {
PlotLayoutCanvas $varname
- PlotBuildDataSetMenu $varname
+ PlotUpdateDataSetMenu $varname
PlotStats $varname
PlotList $varname
@@ -265,7 +265,7 @@ proc PlotAddElement {varname} {
# update menus
$var(proc,updateelement) $varname
- PlotBuildDataSetMenu $varname
+ PlotUpdateDataSetMenu $varname
PlotStats $varname
PlotList $varname
@@ -342,28 +342,12 @@ proc PlotDeleteDataSet {varname} {
# update menus
$var(proc,updateelement) $varname
- PlotBuildDataSetMenu $varname
+ PlotUpdateDataSetMenu $varname
PlotStats $varname
PlotList $varname
}
-proc PlotBuildDataSetMenu {varname} {
- upvar #0 $varname var
- global $varname
-
- # remove menu item
- $var(mb).graph.select delete 0 end
-
- # create menu item
- set cc $var(graph,current)
- foreach nn $var(graph,dss) {
- $var(mb).graph.select add radiobutton -label "$var($cc,$nn,name)" \
- -variable ${varname}(graph,ds,current) -value $nn \
- -command [list PlotCurrentDataSet $varname]
- }
-}
-
proc PlotCurrentGraph {varname} {
upvar #0 $varname var
global $varname
@@ -374,7 +358,7 @@ proc PlotCurrentGraph {varname} {
PlotRestoreState $varname
- PlotBuildDataSetMenu $varname
+ PlotUpdateDataSetMenu $varname
PlotStats $varname
PlotList $varname