summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2019-07-21 18:45:07 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2019-07-21 18:45:07 (GMT)
commit0056598d0f225c387d99ccf94932fa247c144a2b (patch)
tree0f3d6d3f834d97e549b6c14a9ec01145ea205214
parent96a2c0f616ead43a6c2c31338804fa2c2131cb7f (diff)
downloadblt-0056598d0f225c387d99ccf94932fa247c144a2b.zip
blt-0056598d0f225c387d99ccf94932fa247c144a2b.tar.gz
blt-0056598d0f225c387d99ccf94932fa247c144a2b.tar.bz2
support multiple graphs per plot
-rw-r--r--ds9/library/plot.tcl6
-rw-r--r--ds9/library/plotdialog.tcl12
2 files changed, 13 insertions, 5 deletions
diff --git a/ds9/library/plot.tcl b/ds9/library/plot.tcl
index fd2db2c..baa9c2f 100644
--- a/ds9/library/plot.tcl
+++ b/ds9/library/plot.tcl
@@ -549,7 +549,11 @@ proc PlotUpdateCanvas {varname} {
PlotSaveState $varname
foreach cc $var(graphs) {
- $var($cc,graph) configure -barmode $var(bar,mode)
+ switch ($cc,type) {
+ line {}
+ bar {$var($cc,graph) configure -barmode $var(bar,mode)}
+ scatter {}
+ }
$var($cc,graph) 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/plotdialog.tcl b/ds9/library/plotdialog.tcl
index f73294e..133568e 100644
--- a/ds9/library/plotdialog.tcl
+++ b/ds9/library/plotdialog.tcl
@@ -693,13 +693,11 @@ proc PlotUpdateGraphMenu {varname} {
global $varname
if {[llength $var(graph,dss)] == 0} {
- $var(mb) entryconfig [msgcat::mc {Data}] -state disabled
$var(mb).graph entryconfig [msgcat::mc {Duplicate Dataset}] \
-state disabled
$var(mb).graph entryconfig [msgcat::mc {Delete Dataset}] \
-state disabled
} else {
- $var(mb) entryconfig [msgcat::mc {Data}] -state normal
$var(mb).graph entryconfig [msgcat::mc {Duplicate Dataset}] \
-state normal
@@ -738,12 +736,18 @@ proc PlotUpdateDataMenu {varname} {
bar {
$var(mb) add cascade -label [msgcat::mc {Data}] \
-menu $var(mb).databar
- $var(mb).graph entryconfig Mode -state normal
+ $var(mb).graph entryconfig [msgcat::mc {Mode}] -state normal
}
scatter {
$var(mb) add cascade -label [msgcat::mc {Data}] \
-menu $var(mb).datascatter
- $var(mb).graph entryconfig Mode -state disabled
+ $var(mb).graph entryconfig [msgcat::mc {Mode}] -state disabled
}
}
+
+ if {[llength $var(graph,dss)] == 0} {
+ $var(mb) entryconfig [msgcat::mc {Data}] -state disabled
+ } else {
+ $var(mb) entryconfig [msgcat::mc {Data}] -state normal
+ }
}