summaryrefslogtreecommitdiffstats
path: root/ds9/library
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2019-07-26 15:55:24 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2019-07-26 15:55:24 (GMT)
commit20cd3a2bc44796f3b844a8f790e4ac829bfa05a7 (patch)
tree62f574799d0a7d5933573582472370dfd967a969 /ds9/library
parent8e7f090f25d319d54fcb33d6c378b91fc517f90a (diff)
downloadblt-20cd3a2bc44796f3b844a8f790e4ac829bfa05a7.zip
blt-20cd3a2bc44796f3b844a8f790e4ac829bfa05a7.tar.gz
blt-20cd3a2bc44796f3b844a8f790e4ac829bfa05a7.tar.bz2
support multiple graphs per plot
Diffstat (limited to 'ds9/library')
-rw-r--r--ds9/library/plot.tcl7
-rw-r--r--ds9/library/plotconfig.tcl2
-rw-r--r--ds9/library/plotdialog.tcl7
-rw-r--r--ds9/library/plotstate.tcl14
4 files changed, 23 insertions, 7 deletions
diff --git a/ds9/library/plot.tcl b/ds9/library/plot.tcl
index 32699b6..dbf3c82 100644
--- a/ds9/library/plot.tcl
+++ b/ds9/library/plot.tcl
@@ -706,13 +706,6 @@ proc PlotUpdateGraph {varname} {
}
}
- # Menus
- if {$var(graph,ds,xdata) != {}} {
- $var(mb).file entryconfig "[msgcat::mc {Save Data}]..." -state normal
- } else {
- $var(mb).file entryconfig "[msgcat::mc {Save Data}]..." -state disabled
- }
-
# Graph
$var(graph) configure -plotpadx 0 -plotpady 0 -title $var(graph,title)
diff --git a/ds9/library/plotconfig.tcl b/ds9/library/plotconfig.tcl
index 0b6c6c4..9ca3b67 100644
--- a/ds9/library/plotconfig.tcl
+++ b/ds9/library/plotconfig.tcl
@@ -183,6 +183,8 @@ proc PlotLoadConfigFile {varname filename} {
$var(graph,proc,updateelement) $varname
PlotUpdateGraph $varname
PlotUpdateCanvas $varname
+
+ PlotUpdateMenus $varname
}
proc PlotSaveConfig {varname} {
diff --git a/ds9/library/plotdialog.tcl b/ds9/library/plotdialog.tcl
index 39fa809..fa9d22f 100644
--- a/ds9/library/plotdialog.tcl
+++ b/ds9/library/plotdialog.tcl
@@ -624,6 +624,13 @@ proc PlotUpdateMenus {varname} {
upvar #0 $varname var
global $varname
+ # File
+ if {$var(graph,ds,xdata) != {}} {
+ $var(mb).file entryconfig "[msgcat::mc {Save Data}]..." -state normal
+ } else {
+ $var(mb).file entryconfig "[msgcat::mc {Save Data}]..." -state disabled
+ }
+
# Canvas
switch $var(layout) {
grid {
diff --git a/ds9/library/plotstate.tcl b/ds9/library/plotstate.tcl
index 9c2858c..3ec86ad 100644
--- a/ds9/library/plotstate.tcl
+++ b/ds9/library/plotstate.tcl
@@ -11,6 +11,14 @@ proc PlotDefState {} {
# per Canvas
set pap(layout) grid
set pap(layout,lock) 0
+ set pap(layout,axis,x,log) 0
+ set pap(layout,axis,x,flip) 0
+ set pap(layout,axis,x,min) 0
+ set pap(layout,axis,x,max) 0
+ set pap(layout,axis,y,log) 0
+ set pap(layout,axis,y,flip) 0
+ set pap(layout,axis,y,min) 0
+ set pap(layout,axis,y,max) 0
set pap(background) white
set pap(bar,mode) normal
@@ -109,6 +117,7 @@ proc PlotInitGraph {varname} {
set var(graph,legend,title) $pap(graph,legend,title)
+ set var(graph,axis,x,manage) 1
set var(graph,axis,x,title) $pap(graph,axis,x,title)
set var(graph,axis,x,grid) $pap(graph,axis,x,grid)
set var(graph,axis,x,log) $pap(graph,axis,x,log)
@@ -118,6 +127,7 @@ proc PlotInitGraph {varname} {
set var(graph,axis,x,max) $pap(graph,axis,x,max)
set var(graph,axis,x,format) $pap(graph,axis,x,format)
+ set var(graph,axis,y,manage) 1
set var(graph,axis,y,title) $pap(graph,axis,y,title)
set var(graph,axis,y,grid) $pap(graph,axis,y,grid)
set var(graph,axis,y,log) $pap(graph,axis,y,log)
@@ -182,6 +192,7 @@ proc PlotSaveState {varname} {
set var($cc,legend,title) $var(graph,legend,title)
+ set var($cc,axis,x,manage) $var(graph,axis,x,manage)
set var($cc,axis,x,title) $var(graph,axis,x,title)
set var($cc,axis,x,grid) $var(graph,axis,x,grid)
set var($cc,axis,x,log) $var(graph,axis,x,log)
@@ -191,6 +202,7 @@ proc PlotSaveState {varname} {
set var($cc,axis,x,max) $var(graph,axis,x,max)
set var($cc,axis,x,format) $var(graph,axis,x,format)
+ set var($cc,axis,y,manage) $var(graph,axis,y,manage)
set var($cc,axis,y,title) $var(graph,axis,y,title)
set var($cc,axis,y,grid) $var(graph,axis,y,grid)
set var($cc,axis,y,log) $var(graph,axis,y,log)
@@ -255,6 +267,7 @@ proc PlotRestoreState {varname} {
set var(graph,legend,title) $var($cc,legend,title)
+ set var(graph,axis,x,manage) $var($cc,axis,x,manage)
set var(graph,axis,x,title) $var($cc,axis,x,title)
set var(graph,axis,x,grid) $var($cc,axis,x,grid)
set var(graph,axis,x,log) $var($cc,axis,x,log)
@@ -264,6 +277,7 @@ proc PlotRestoreState {varname} {
set var(graph,axis,x,max) $var($cc,axis,x,max)
set var(graph,axis,x,format) $var($cc,axis,x,format)
+ set var(graph,axis,y,manage) $var($cc,axis,y,manage)
set var(graph,axis,y,title) $var($cc,axis,y,title)
set var(graph,axis,y,grid) $var($cc,axis,y,grid)
set var(graph,axis,y,log) $var($cc,axis,y,log)