summaryrefslogtreecommitdiffstats
path: root/ds9/library/plot.tcl
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2019-07-22 18:00:19 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2019-07-22 18:00:19 (GMT)
commitfaa2613ce9bd460dd66c19b791804fdd39d037c9 (patch)
tree1b5b75ae7af8c501ab48c0748c1d5aa89fa3cda5 /ds9/library/plot.tcl
parent6fa87fd9727fd1df8e1e294936a06daeaa68486e (diff)
downloadblt-faa2613ce9bd460dd66c19b791804fdd39d037c9.zip
blt-faa2613ce9bd460dd66c19b791804fdd39d037c9.tar.gz
blt-faa2613ce9bd460dd66c19b791804fdd39d037c9.tar.bz2
support multiple graphs per plot
Diffstat (limited to 'ds9/library/plot.tcl')
-rw-r--r--ds9/library/plot.tcl17
1 files changed, 5 insertions, 12 deletions
diff --git a/ds9/library/plot.tcl b/ds9/library/plot.tcl
index 85e9641..ef99f7b 100644
--- a/ds9/library/plot.tcl
+++ b/ds9/library/plot.tcl
@@ -155,7 +155,7 @@ proc PlotAddGraph {varname type} {
}
scatter {
PlotScatterAddGraph $varname
- set var(graph,proc,updateelement) PlotScattterUpdateElement
+ set var(graph,proc,updateelement) PlotScatterUpdateElement
set var(graph,proc,highlite) PlotScatterHighLiteElement
set var(graph,proc,button) PlotScatterButton
}
@@ -738,24 +738,16 @@ proc PlotBackup {ch dir} {
upvar #0 $varname var
global $varname
- set cc $var(graph,current)
- switch $var($cc,type) {
- line {puts $ch "PlotLineTool"}
- bar {puts $ch "PlotBarTool"}
- scatter {puts $ch "PlotScatterTool"}
- }
+ puts $ch "PlotDialog $varname $varname"
+ set cc $var(graph,current)
set gr $var(graph,current)
set ds $var(graph,ds,current)
- set first 1
foreach cc $var(graphs) {
set var(graph,current) $cc
PlotCurrentGraph $varname
- if {!$first} {
- puts $ch "PlotAddGraph $varname $var($cc,type)"
- }
- set first 0
+ puts $ch "PlotAddGraph $varname $var($cc,type)"
foreach nn $var($cc,dss) {
set var(graph,ds,current) $nn
@@ -768,6 +760,7 @@ proc PlotBackup {ch dir} {
puts $ch "PlotLoadConfigFile $varname $fdir/graph${cc}ds${nn}.plt"
}
}
+ puts $ch "wm geometry $var(top) [winfo width $var(top)]x[winfo height $var(top)]"
set var(graph,current) $gr
PlotCurrentGraph $varname