summaryrefslogtreecommitdiffstats
path: root/ds9
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2019-06-06 16:55:19 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2019-06-06 16:55:19 (GMT)
commitd953f256a5c736b285d0a762caf0dabcbe5df4b5 (patch)
treebfb7ce7284fb52e79b3458e6a3e59a88e7b4198e /ds9
parent10be2d85ae114d9e0e34eb438f49fbe54ea17779 (diff)
downloadblt-d953f256a5c736b285d0a762caf0dabcbe5df4b5.zip
blt-d953f256a5c736b285d0a762caf0dabcbe5df4b5.tar.gz
blt-d953f256a5c736b285d0a762caf0dabcbe5df4b5.tar.bz2
support multiple graphs per plot
Diffstat (limited to 'ds9')
-rw-r--r--ds9/library/markeranalysishist.tcl2
-rw-r--r--ds9/library/markeranalysispanda.tcl9
-rw-r--r--ds9/library/markeranalysisplot2d.tcl14
-rw-r--r--ds9/library/markeranalysisplot3d.tcl24
-rw-r--r--ds9/library/markeranalysisradial.tcl11
5 files changed, 32 insertions, 28 deletions
diff --git a/ds9/library/markeranalysishist.tcl b/ds9/library/markeranalysishist.tcl
index 5aa5dbf..ed585f3 100644
--- a/ds9/library/markeranalysishist.tcl
+++ b/ds9/library/markeranalysishist.tcl
@@ -80,8 +80,6 @@ proc MarkerAnalysisHistogramCB {frame id} {
}
PlotLineDialog $vvarname $tt Histogram $bunit Counts
- set cc $vvar(graph,current)
-
set vvar(graph,ds,manage) 0
set vvar(graph,ds,dim) xy
set vvar(graph,ds,xdata) $xdata
diff --git a/ds9/library/markeranalysispanda.tcl b/ds9/library/markeranalysispanda.tcl
index d60b158..d14871a 100644
--- a/ds9/library/markeranalysispanda.tcl
+++ b/ds9/library/markeranalysispanda.tcl
@@ -151,10 +151,11 @@ proc MarkerAnalysisPandaAxisTitle {vvarname} {
}
# set for plot code
- set vvar(axis,x,title) $xtitle
- set vvar(axis,y,title) $ytitle
+ set vvar(graph,axis,x,title) $xtitle
+ set vvar(graph,axis,y,title) $ytitle
# update now (may not make it into plot code)
- $vvar(graph) xaxis configure -title $xtitle
- $vvar(graph) yaxis configure -title $ytitle
+ set cc $vvar(graph,current)
+ $vvar($cc) xaxis configure -title $xtitle
+ $vvar($cc) yaxis configure -title $ytitle
}
diff --git a/ds9/library/markeranalysisplot2d.tcl b/ds9/library/markeranalysisplot2d.tcl
index 58abb12..ae5748e 100644
--- a/ds9/library/markeranalysisplot2d.tcl
+++ b/ds9/library/markeranalysisplot2d.tcl
@@ -166,10 +166,10 @@ proc MarkerAnalysisPlot2dCB {frame id} {
set vvar(graph,format) 0
set vvar(xcdata) $xcdata
set vvar(ycdata) $ycdata
- $vvar(graph) xaxis configure \
- -command "MarkerAnalysisPlot2dXAxis $vvarname"
set cc $vvar(graph,current)
+ $vvar($cc) xaxis configure \
+ -command "MarkerAnalysisPlot2dXAxis $vvarname"
set vvar(graph,ds,manage) 0
set vvar(graph,ds,dim) xy
@@ -235,10 +235,11 @@ proc MarkerAnalysisPlot2dXAxisTitle {vvarname} {
}
# set for plot code
- set vvar(axis,x,title) $xtitle
+ set vvar(graph,axis,x,title) $xtitle
# update now (may not make it into plot code)
- $vvar(graph) xaxis configure -title $xtitle
+ set cc $vvar(graph,current)
+ $vvar($cc) xaxis configure -title $xtitle
}
proc MarkerAnalysisPlot2dYAxisTitle {vvarname} {
@@ -246,10 +247,11 @@ proc MarkerAnalysisPlot2dYAxisTitle {vvarname} {
global $vvarname
# set for plot code
- set vvar(axis,y,title) "$vvar(bunit) [string totitle $vvar(method)]"
+ set vvar(graph,axis,y,title) "$vvar(bunit) [string totitle $vvar(method)]"
# update now (may not make it into plot code)
- $vvar(graph) yaxis configure -title $vvar(axis,y,title)
+ set cc $vvar(graph,current)
+ $vvar($cc) yaxis configure -title $vvar(graph,axis,y,title)
}
proc MarkerAnalysisPlot2dXAxis {vvarname w xx} {
diff --git a/ds9/library/markeranalysisplot3d.tcl b/ds9/library/markeranalysisplot3d.tcl
index 8ab1e55..19f57f3 100644
--- a/ds9/library/markeranalysisplot3d.tcl
+++ b/ds9/library/markeranalysisplot3d.tcl
@@ -165,17 +165,16 @@ proc MarkerAnalysisPlot3dCB {frame id} {
MarkerAnalysisPlot3dXAxisTitle $vvarname
MarkerAnalysisPlot3dYAxisTitle $vvarname
- set vvar(markerslice) [$vvar(graph) marker create line -element bar1 \
+ set cc $vvar(graph,current)
+ set vvar(markerslice) [$vvar($cc) marker create line -element bar1 \
-outline cyan -linewidth 2 \
-bindtags [list slice]]
- $vvar(graph) marker bind slice <B1-Motion> \
+ $vvar($cc) marker bind slice <B1-Motion> \
[list MarkerAnalysisPlot3dMotion $vvarname %x %y]
set vvar(mode) pointer
PlotChangeMode $vvarname
- set cc $vvar(graph,current)
-
set vvar(graph,ds,manage) 0
set vvar(graph,ds,dim) xy
set vvar(graph,ds,xdata) $xdata
@@ -207,7 +206,8 @@ proc MarkerAnalysisPlot3dMotion {vvarname xx yy} {
return
}
- set vvar(slice) [lindex [$vvar(graph) invtransform $xx $yy] 0]
+ set cc $vvar(graph,current)
+ set vvar(slice) [lindex [$vvar($cc) invtransform $xx $yy] 0]
$vvar(frame) update fits slice $vvar(slice) $vvar(system) $vvar(sky)
MarkerAnalysisPlot3dMarker $vvarname
@@ -236,7 +236,9 @@ proc MarkerAnalysisPlot3dMarker {vvarname} {
if {[::math::fuzzy::tge $vvar(slice) $max]} {
set vvar(slice) [expr $max-$delta]
}
- $vvar(graph) marker configure $vvar(markerslice) \
+
+ set cc $vvar(graph,current)
+ $vvar($cc) marker configure $vvar(markerslice) \
-coords "$vvar(slice) -Inf $vvar(slice) Inf"
}
@@ -297,10 +299,11 @@ proc MarkerAnalysisPlot3dXAxisTitle {vvarname} {
}
# set for plot code
- set vvar(axis,x,title) $xtitle
+ set vvar(graph,axis,x,title) $xtitle
# update now (may not make it into plot code)
- $vvar(graph) xaxis configure -title $xtitle
+ set cc $vvar(graph,current)
+ $vvar($cc) xaxis configure -title $xtitle
}
proc MarkerAnalysisPlot3dYAxisTitle {vvarname} {
@@ -308,8 +311,9 @@ proc MarkerAnalysisPlot3dYAxisTitle {vvarname} {
global $vvarname
# set for plot code
- set vvar(axis,y,title) "$vvar(bunit) [string totitle $vvar(method)]"
+ set vvar(graph,axis,y,title) "$vvar(bunit) [string totitle $vvar(method)]"
# update now (may not make it into plot code)
- $vvar(graph) yaxis configure -title $vvar(axis,y,title)
+ set cc $vvar(graph,current)
+ $vvar($cc) yaxis configure -title $vvar(graph,axis,y,title)
}
diff --git a/ds9/library/markeranalysisradial.tcl b/ds9/library/markeranalysisradial.tcl
index 0507735..251cd25 100644
--- a/ds9/library/markeranalysisradial.tcl
+++ b/ds9/library/markeranalysisradial.tcl
@@ -107,8 +107,6 @@ proc MarkerAnalysisRadialCB {frame id} {
PlotLineDialog $vvarname $tt "Radial Profile" $sys {}
MarkerAnalysisRadialAxisTitle $vvarname
- set cc $vvar(graph,current)
-
set vvar(graph,ds,manage) 0
set vvar(graph,ds,dim) xyey
set vvar(graph,ds,xdata) $xdata
@@ -170,10 +168,11 @@ proc MarkerAnalysisRadialAxisTitle {vvarname} {
}
# set for plot code
- set vvar(axis,x,title) $xtitle
- set vvar(axis,y,title) $ytitle
+ set vvar(graph,axis,x,title) $xtitle
+ set vvar(graph,axis,y,title) $ytitle
# update now (may not make it into plot code)
- $vvar(graph) xaxis configure -title $xtitle
- $vvar(graph) yaxis configure -title $ytitle
+ set cc $vvar(graph,current)
+ $vvar($cc) xaxis configure -title $xtitle
+ $vvar($cc) yaxis configure -title $ytitle
}