diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2019-06-06 16:55:19 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2019-06-06 16:55:19 (GMT) |
commit | d953f256a5c736b285d0a762caf0dabcbe5df4b5 (patch) | |
tree | bfb7ce7284fb52e79b3458e6a3e59a88e7b4198e /ds9/library/markeranalysisplot3d.tcl | |
parent | 10be2d85ae114d9e0e34eb438f49fbe54ea17779 (diff) | |
download | blt-d953f256a5c736b285d0a762caf0dabcbe5df4b5.zip blt-d953f256a5c736b285d0a762caf0dabcbe5df4b5.tar.gz blt-d953f256a5c736b285d0a762caf0dabcbe5df4b5.tar.bz2 |
support multiple graphs per plot
Diffstat (limited to 'ds9/library/markeranalysisplot3d.tcl')
-rw-r--r-- | ds9/library/markeranalysisplot3d.tcl | 24 |
1 files changed, 14 insertions, 10 deletions
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) } |