diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2019-06-07 18:51:01 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2019-06-07 18:51:01 (GMT) |
commit | 2ea2b0e83a4b3c58d82b13d4d26fdad5b3853d2e (patch) | |
tree | 2cd9294318e74edf37aaa301bdbd9f439e524645 /ds9/library/plot.tcl | |
parent | 071832337409b3ff7cf063d16e1072e96d2d86f1 (diff) | |
download | blt-2ea2b0e83a4b3c58d82b13d4d26fdad5b3853d2e.zip blt-2ea2b0e83a4b3c58d82b13d4d26fdad5b3853d2e.tar.gz blt-2ea2b0e83a4b3c58d82b13d4d26fdad5b3853d2e.tar.bz2 |
support multiple graphs per plot
Diffstat (limited to 'ds9/library/plot.tcl')
-rw-r--r-- | ds9/library/plot.tcl | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/ds9/library/plot.tcl b/ds9/library/plot.tcl index 52f9ecf..6f29603 100644 --- a/ds9/library/plot.tcl +++ b/ds9/library/plot.tcl @@ -80,7 +80,7 @@ proc PlotDeleteGraph {varname} { } # Data -proc PlotAddData {varname} { +proc PlotAddElement {varname} { upvar #0 $varname var global $varname @@ -110,6 +110,11 @@ proc PlotAddData {varname} { -yerror $var(graph,ds,yedata) } } + + # update data set menu + $var(mb).graph.select add radiobutton -label "$var(graph,ds,name)" \ + -variable ${varname}($cc,data,current) -value $nn \ + -command [list PlotCurrentData $varname] } proc PlotCurrentGraph {varname} { @@ -224,14 +229,7 @@ proc PlotExternal {varname} { set var(graph,ds,name) "Dataset $nn" PlotSaveState $varname - - # update data set menu - $var(mb).graph.select add radiobutton \ - -label "[msgcat::mc {Dataset}] $nn" \ - -variable ${varname}($cc,data,current) -value $nn \ - -command "PlotCurrentData $varname" - - PlotAddData $varname + PlotAddElement $varname } proc PlotList {varname} { |