From f75994fc77b6e520c7df8ecd0d89fa87e2dc44ea Mon Sep 17 00:00:00 2001 From: William Joye Date: Thu, 1 Aug 2019 11:35:04 -0400 Subject: support multiple graphs per plot --- ds9/library/plot.tcl | 6 +++++- ds9/library/plotstate.tcl | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ds9/library/plot.tcl b/ds9/library/plot.tcl index e01e331..d54f31f 100644 --- a/ds9/library/plot.tcl +++ b/ds9/library/plot.tcl @@ -641,6 +641,7 @@ proc PlotUpdateCanvas {varname} { column { set legendpos $var(legend,position) + set var(layout,axis,x,title) {} set var(layout,axis,x,min) 0 set var(layout,axis,x,max) 1 set var(layout,axis,x,grid) 1 @@ -663,6 +664,7 @@ proc PlotUpdateCanvas {varname} { set xmax $var($first,axis,x,max) } + set var(layout,axis,x,title) $var($first,axis,x,title) set var(layout,axis,x,min) $xmin set var(layout,axis,x,max) $xmax set var(layout,axis,x,grid) $var($first,axis,x,grid) @@ -778,10 +780,12 @@ proc PlotUpdateGraph {varname} { } if {$var(graph,axis,x,manage)} { + set xtitle $var(graph,axis,x,title) set xgrid $var(graph,axis,x,grid) set xlog $var(graph,axis,x,log) set xflip $var(graph,axis,x,flip) } else { + set xtitle $var(layout,axis,x,title) set xgrid $var(layout,axis,x,grid) set xlog $var(layout,axis,x,log) set xflip $var(layout,axis,x,flip) @@ -817,7 +821,7 @@ proc PlotUpdateGraph {varname} { } if {[$var(graph) xaxis cget -showticks]} { - $var(graph) xaxis configure -title $var(graph,axis,x,title) + $var(graph) xaxis configure -title $xtitle } else { $var(graph) xaxis configure -title {} } diff --git a/ds9/library/plotstate.tcl b/ds9/library/plotstate.tcl index d7fd277..58e7404 100644 --- a/ds9/library/plotstate.tcl +++ b/ds9/library/plotstate.tcl @@ -11,6 +11,7 @@ proc PlotDefState {} { # per Canvas set pap(layout) grid set pap(layout,strip,weight) 50 + set pap(layout,axis,x,title) {} set pap(layout,axis,x,min) 0 set pap(layout,axis,x,max) 0 set pap(layout,axis,x,grid) 0 -- cgit v0.12