summaryrefslogtreecommitdiffstats
path: root/ds9
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2019-05-28 17:26:06 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2019-05-28 17:26:06 (GMT)
commit4f2a9b5c0ecc7a591a2b0329c2250d48d56d9753 (patch)
tree8a0e59ad040142f5f794ba375330a0e6cf7a99e7 /ds9
parent9784610917d011936dd0bcba04619aa754c14b6d (diff)
downloadblt-4f2a9b5c0ecc7a591a2b0329c2250d48d56d9753.zip
blt-4f2a9b5c0ecc7a591a2b0329c2250d48d56d9753.tar.gz
blt-4f2a9b5c0ecc7a591a2b0329c2250d48d56d9753.tar.bz2
add multiple plot support
Diffstat (limited to 'ds9')
-rw-r--r--ds9/library/plotdialog.tcl61
-rw-r--r--ds9/library/plotline.tcl53
-rw-r--r--ds9/library/plotscatter.tcl50
3 files changed, 63 insertions, 101 deletions
diff --git a/ds9/library/plotdialog.tcl b/ds9/library/plotdialog.tcl
index 536d519..8694893 100644
--- a/ds9/library/plotdialog.tcl
+++ b/ds9/library/plotdialog.tcl
@@ -520,6 +520,67 @@ proc PlotLineSmoothMenu {which var} {
-variable $var -value catrom
}
+proc PlotShapeMenu {varname} {
+ upvar #0 $varname var
+ global $varname
+
+ set tt $var(graph,total)
+ set cc $var(graph,current)
+
+ # Shape
+ menu $var(mb).data.shape
+ $var(mb).data.shape add radiobutton \
+ -label [msgcat::mc {None}] \
+ -variable ${varname}(graph$cc,shape,symbol) -value none \
+ -command [list $var(proc,updateelement) $varname]
+ $var(mb).data.shape add radiobutton \
+ -label [msgcat::mc {Circle}] \
+ -variable ${varname}(graph$cc,shape,symbol) -value circle \
+ -command [list $var(proc,updateelement) $varname]
+ $var(mb).data.shape add radiobutton \
+ -label [msgcat::mc {Square}] \
+ -variable ${varname}(graph$cc,shape,symbol) -value square \
+ -command [list $var(proc,updateelement) $varname]
+ $var(mb).data.shape add radiobutton \
+ -label [msgcat::mc {Diamond}] \
+ -variable ${varname}(graph$cc,shape,symbol) -value diamond \
+ -command [list $var(proc,updateelement) $varname]
+ $var(mb).data.shape add radiobutton \
+ -label [msgcat::mc {Plus}] \
+ -variable ${varname}(graph$cc,shape,symbol) -value plus \
+ -command [list $var(proc,updateelement) $varname]
+ $var(mb).data.shape add radiobutton \
+ -label [msgcat::mc {Cross}] \
+ -variable ${varname}(graph$cc,shape,symbol) -value cross \
+ -command [list $var(proc,updateelement) $varname]
+ $var(mb).data.shape add radiobutton \
+ -label [msgcat::mc {Simple Plus}] \
+ -variable ${varname}(graph$cc,shape,symbol) -value splus \
+ -command [list $var(proc,updateelement) $varname]
+ $var(mb).data.shape add radiobutton \
+ -label [msgcat::mc {Simple Cross}] \
+ -variable ${varname}(graph$cc,shape,symbol) -value scross \
+ -command [list $var(proc,updateelement) $varname]
+ $var(mb).data.shape add radiobutton \
+ -label [msgcat::mc {Triangle}] \
+ -variable ${varname}(graph$cc,shape,symbol) -value triangle \
+ -command [list $var(proc,updateelement) $varname]
+ $var(mb).data.shape add radiobutton \
+ -label [msgcat::mc {Arrow}] \
+ -variable ${varname}(graph$cc,shape,symbol) -value arrow \
+ -command [list $var(proc,updateelement) $varname]
+ $var(mb).data.shape add separator
+ $var(mb).data.shape add checkbutton \
+ -label [msgcat::mc {Fill}] \
+ -variable ${varname}(graph$cc,shape,fill) \
+ -command [list $var(proc,updateelement) $varname]
+ $var(mb).data.shape add cascade -label [msgcat::mc {Color}] \
+ -menu $var(mb).data.shape.color
+
+ PlotColorMenu $var(mb).data.shape.color $varname graph$cc,shape,color \
+ [list $var(proc,updateelement) $varname]
+}
+
proc PlotExportDialog {varname format} {
upvar #0 $varname var
global $varname
diff --git a/ds9/library/plotline.tcl b/ds9/library/plotline.tcl
index 33c558c..bd86187 100644
--- a/ds9/library/plotline.tcl
+++ b/ds9/library/plotline.tcl
@@ -75,58 +75,7 @@ proc PlotLineDialog {varname wtt title xaxis yaxis} {
$var(mb).data add command -label "[msgcat::mc {Name}]..." \
-command [list DatasetNameDialog $varname]
- # Shape
- menu $var(mb).data.shape
- $var(mb).data.shape add radiobutton \
- -label [msgcat::mc {None}] \
- -variable ${varname}(graph$cc,shape,symbol) -value none \
- -command [list PlotLineUpdateElement $varname]
- $var(mb).data.shape add radiobutton \
- -label [msgcat::mc {Circle}] \
- -variable ${varname}(graph$cc,shape,symbol) -value circle \
- -command [list PlotLineUpdateElement $varname]
- $var(mb).data.shape add radiobutton \
- -label [msgcat::mc {Square}] \
- -variable ${varname}(graph$cc,shape,symbol) -value square \
- -command [list PlotLineUpdateElement $varname]
- $var(mb).data.shape add radiobutton \
- -label [msgcat::mc {Diamond}] \
- -variable ${varname}(graph$cc,shape,symbol) -value diamond \
- -command [list PlotLineUpdateElement $varname]
- $var(mb).data.shape add radiobutton \
- -label [msgcat::mc {Plus}] \
- -variable ${varname}(graph$cc,shape,symbol) -value plus \
- -command [list PlotLineUpdateElement $varname]
- $var(mb).data.shape add radiobutton \
- -label [msgcat::mc {Cross}] \
- -variable ${varname}(graph$cc,shape,symbol) -value cross \
- -command [list PlotLineUpdateElement $varname]
- $var(mb).data.shape add radiobutton \
- -label [msgcat::mc {Simple Plus}] \
- -variable ${varname}(graph$cc,shape,symbol) -value splus \
- -command [list PlotLineUpdateElement $varname]
- $var(mb).data.shape add radiobutton \
- -label [msgcat::mc {Simple Cross}] \
- -variable ${varname}(graph$cc,shape,symbol) -value scross \
- -command [list PlotLineUpdateElement $varname]
- $var(mb).data.shape add radiobutton \
- -label [msgcat::mc {Triangle}] \
- -variable ${varname}(graph$cc,shape,symbol) -value triangle \
- -command [list PlotLineUpdateElement $varname]
- $var(mb).data.shape add radiobutton \
- -label [msgcat::mc {Arrow}] \
- -variable ${varname}(graph$cc,shape,symbol) -value arrow \
- -command [list PlotLineUpdateElement $varname]
- $var(mb).data.shape add separator
- $var(mb).data.shape add checkbutton \
- -label [msgcat::mc {Fill}] \
- -variable ${varname}(graph$cc,shape,fill) \
- -command [list PlotLineUpdateElement $varname]
- $var(mb).data.shape add cascade -label [msgcat::mc {Color}] \
- -menu $var(mb).data.shape.color
-
- PlotColorMenu $var(mb).data.shape.color $varname graph$cc,shape,color \
- [list PlotLineUpdateElement $varname]
+ PlotShapeMenu $varname
# Smooth
menu $var(mb).data.smooth
diff --git a/ds9/library/plotscatter.tcl b/ds9/library/plotscatter.tcl
index dab578e..5904ce7 100644
--- a/ds9/library/plotscatter.tcl
+++ b/ds9/library/plotscatter.tcl
@@ -67,55 +67,7 @@ proc PlotScatterDialog {varname wtt title xaxis yaxis} {
$var(mb).data add command -label "[msgcat::mc {Name}]..." \
-command [list DatasetNameDialog $varname]
- # Shape
- menu $var(mb).data.shape
- $var(mb).data.shape add radiobutton \
- -label [msgcat::mc {Circle}] \
- -variable ${varname}(graph$cc,shape,symbol) -value circle \
- -command [list PlotScatterUpdateElement $varname]
- $var(mb).data.shape add radiobutton \
- -label [msgcat::mc {Square}] \
- -variable ${varname}(graph$cc,shape,symbol) -value square \
- -command [list PlotScatterUpdateElement $varname]
- $var(mb).data.shape add radiobutton \
- -label [msgcat::mc {Diamond}] \
- -variable ${varname}(graph$cc,shape,symbol) -value diamond \
- -command [list PlotScatterUpdateElement $varname]
- $var(mb).data.shape add radiobutton \
- -label [msgcat::mc {Plus}] \
- -variable ${varname}(graph$cc,shape,symbol) -value plus \
- -command [list PlotScatterUpdateElement $varname]
- $var(mb).data.shape add radiobutton \
- -label [msgcat::mc {Cross}] \
- -variable ${varname}(graph$cc,shape,symbol) -value cross \
- -command [list PlotScatterUpdateElement $varname]
- $var(mb).data.shape add radiobutton \
- -label [msgcat::mc {Simple Plus}] \
- -variable ${varname}(graph$cc,shape,symbol) -value splus \
- -command [list PlotScatterUpdateElement $varname]
- $var(mb).data.shape add radiobutton \
- -label [msgcat::mc {Simple Cross}] \
- -variable ${varname}(graph$cc,shape,symbol) -value scross \
- -command [list PlotScatterUpdateElement $varname]
- $var(mb).data.shape add radiobutton \
- -label [msgcat::mc {Triangle}] \
- -variable ${varname}(graph$cc,shape,symbol) -value triangle \
- -command [list PlotScatterUpdateElement $varname]
- $var(mb).data.shape add radiobutton \
- -label [msgcat::mc {Arrow}] \
- -variable ${varname}(graph$cc,shape,symbol) -value arrow \
- -command [list PlotScatterUpdateElement $varname]
- $var(mb).data.shape add separator
- $var(mb).data.shape add checkbutton \
- -label [msgcat::mc {Fill}] \
- -variable ${varname}(graph$cc,shape,fill) \
- -command [list PlotScatterUpdateElement $varname]
- $var(mb).data.shape add cascade -label [msgcat::mc {Color}] \
- -menu $var(mb).data.shape.color
-
- # Color
- PlotColorMenu $var(mb).data.shape.color $varname graph$cc,shape,color \
- [list PlotScatterUpdateElement $varname]
+ PlotShapeMenu $varname
# Error
menu $var(mb).data.error