summaryrefslogtreecommitdiffstats
path: root/ds9
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2019-05-31 18:14:42 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2019-05-31 18:14:42 (GMT)
commit26eb60d30ba6391cc9dee34d5d01472d42566ad2 (patch)
tree4fe2d6c2a424bb1b22f431528ce75fd50172414f /ds9
parent1dcf4d5e0309b72a2f4e2699cfe77028ca5bfd12 (diff)
downloadblt-26eb60d30ba6391cc9dee34d5d01472d42566ad2.zip
blt-26eb60d30ba6391cc9dee34d5d01472d42566ad2.tar.gz
blt-26eb60d30ba6391cc9dee34d5d01472d42566ad2.tar.bz2
add multiple plot support
Diffstat (limited to 'ds9')
-rw-r--r--ds9/library/plot.tcl37
-rw-r--r--ds9/library/plotbar.tcl31
-rw-r--r--ds9/library/plotconfig.tcl27
-rw-r--r--ds9/library/plotdialog.tcl16
-rw-r--r--ds9/library/plotline.tcl11
-rw-r--r--ds9/library/plotprocess.tcl8
-rw-r--r--ds9/library/plotscatter.tcl1
-rw-r--r--ds9/library/plotstate.tcl33
-rw-r--r--ds9/library/prefs.tcl45
-rw-r--r--ds9/parsers/plotparser.tac10
-rw-r--r--ds9/parsers/plotparser.tcl10
-rw-r--r--ds9/parsers/plotsendparser.tac8
-rw-r--r--ds9/parsers/plotsendparser.tcl8
13 files changed, 147 insertions, 98 deletions
diff --git a/ds9/library/plot.tcl b/ds9/library/plot.tcl
index 3c50877..a98b865 100644
--- a/ds9/library/plot.tcl
+++ b/ds9/library/plot.tcl
@@ -528,16 +528,14 @@ proc PlotStatsDestroyCB {varname} {
set var(stats) 0
}
-proc PlotTitle {varname title xaxis yaxis} {
+# procs
+proc PlotUpdateCanvas {varname} {
upvar #0 $varname var
global $varname
set tt $var(graph,total)
- set cc $var(graph,current)
-
- set var(graph,title) "$title"
- set var(axis,x,title) "$xaxis"
- set var(axis,y,title) "$yaxis"
+ for {set ii 1} {$ii<=$tt} {incr ii} {
+ }
}
proc PlotUpdateGraph {varname} {
@@ -627,13 +625,24 @@ proc PlotUpdateGraph {varname} {
-tickfont "{$ds9($var(axis,font,family))} $var(axis,font,size) $var(axis,font,weight) $var(axis,font,slant)" \
-titlefont "{$ds9($var(axis,title,family))} $var(axis,title,size) $var(axis,title,weight) $var(axis,title,slant)"
- $var(graph$cc) legend configure -hide [expr !$var(legend)] \
+ $var(graph$cc) legend configure -hide [expr !$var(graph,legend)] \
-bg $var(graph,bg) \
- -position $var(legend,position) -title $var(legend,title) \
+ -position $var(graph,legend,position) -title $var(graph,legend,title) \
-font "{$ds9($var(legend,font,family))} $var(legend,font,size) $var(legend,font,weight) $var(legend,font,slant)" \
-titlefont "{$ds9($var(legend,title,family))} $var(legend,title,size) $var(legend,title,weight) $var(legend,title,slant)"
}
+proc PlotButton {varname x y} {
+ upvar #0 $varname var
+ global $varname
+}
+
+proc PlotHighliteElement {varname rowlist} {
+ upvar #0 $varname var
+ global $varname
+}
+
+# menus
proc PlotColorMenu {w varname color cmd} {
upvar #0 $varname var
global $varname
@@ -663,6 +672,18 @@ proc PlotColorMenu {w varname color cmd} {
-command [list ColorMenuOther $varname $color $cmd]
}
+proc PlotTitle {varname title xaxis yaxis} {
+ upvar #0 $varname var
+ global $varname
+
+ set tt $var(graph,total)
+ set cc $var(graph,current)
+
+ set var(graph,title) "$title"
+ set var(axis,x,title) "$xaxis"
+ set var(axis,y,title) "$yaxis"
+}
+
proc PlotBackup {ch dir} {
global iap
diff --git a/ds9/library/plotbar.tcl b/ds9/library/plotbar.tcl
index 1e2b9c8..358899f 100644
--- a/ds9/library/plotbar.tcl
+++ b/ds9/library/plotbar.tcl
@@ -43,10 +43,11 @@ proc PlotBarDialog {varname wtt title xaxis yaxis} {
global $varname
set var(proc,addgraph) PlotBarAddGraph
- set var(proc,updategraph) PlotBarUpdateGraph
+ set var(proc,updatecanvas) PlotBarUpdateCanvas
+ set var(proc,updategraph) PlotUpdateGraph
set var(proc,updateelement) PlotBarUpdateElement
- set var(proc,highlite) PlotBarHighliteElement
- set var(proc,button) PlotBarButton
+ set var(proc,highlite) PlotHighliteElement
+ set var(proc,button) PlotButton
PlotDialog $varname $wtt $title $xaxis $yaxis
PlotAddGraph $varname
@@ -63,16 +64,16 @@ proc PlotBarDialog {varname wtt title xaxis yaxis} {
menu $var(mb).graph.mode
$var(mb).graph.mode add radiobutton -label [msgcat::mc {Normal}] \
-variable ${varname}(bar,mode) -value normal \
- -command [list $var(proc,updategraph) $varname]
+ -command [list $var(proc,updatecanvas) $varname]
$var(mb).graph.mode add radiobutton -label [msgcat::mc {Stacked}] \
-variable ${varname}(bar,mode) -value stacked \
- -command [list $var(proc,updategraph) $varname]
+ -command [list $var(proc,updatecanvas) $varname]
$var(mb).graph.mode add radiobutton -label [msgcat::mc {Aligned}] \
-variable ${varname}(bar,mode) -value aligned \
- -command [list $var(proc,updategraph) $varname]
+ -command [list $var(proc,updatecanvas) $varname]
$var(mb).graph.mode add radiobutton -label [msgcat::mc {Overlap}] \
-variable ${varname}(bar,mode) -value overlap \
- -command [list $var(proc,updategraph) $varname]
+ -command [list $var(proc,updatecanvas) $varname]
# Data
$var(mb).data add checkbutton -label [msgcat::mc {Show}] \
@@ -147,15 +148,13 @@ proc PlotBarAddGraph {varname} {
$var(graph$cc) yaxis configure -grid yes
}
-proc PlotBarUpdateGraph {varname} {
+proc PlotBarUpdateCanvas {varname} {
upvar #0 $varname var
global $varname
- PlotUpdateGraph $varname
+ PlotUpdateCanvas $varname
set tt $var(graph,total)
- set cc $var(graph,current)
-
for {set ii 1} {$ii<=$tt} {incr ii} {
$var(graph$ii) configure -barmode $var(bar,mode)
}
@@ -194,13 +193,3 @@ proc PlotBarUpdateElement {varname} {
-showerrorbars $show -errorbarcolor $var(graph,ds,error,color) \
-errorbarwidth $var(graph,ds,error,width) -errorbarcap $cap
}
-
-proc PlotBarButton {varname x y} {
- upvar #0 $varname var
- global $varname
-}
-
-proc PlotBarHighliteElement {varname rowlist} {
- upvar #0 $varname var
- global $varname
-}
diff --git a/ds9/library/plotconfig.tcl b/ds9/library/plotconfig.tcl
index cd9319f..9cfcbd4 100644
--- a/ds9/library/plotconfig.tcl
+++ b/ds9/library/plotconfig.tcl
@@ -26,6 +26,8 @@ proc PlotLoadConfigFile {varname filename} {
# array set $varname [array get analysisplot]
set var(graph,bg) $analysisplot(graph,bg)
+ set var(bar,mode) $analysisplot(bar,mode)
+
set var(graph,title) $analysisplot(graph,title)
set var(graph,title,family) $analysisplot(graph,title,family)
@@ -33,9 +35,6 @@ proc PlotLoadConfigFile {varname filename} {
set var(graph,title,weight) $analysisplot(graph,title,weight)
set var(graph,title,slant) $analysisplot(graph,title,slant)
- set var(legend) $analysisplot(legend)
- set var(legend,title) $analysisplot(legend,title)
- set var(legend,position) $analysisplot(legend,position)
set var(legend,title,family) $analysisplot(legend,title,family)
set var(legend,title,size) $analysisplot(legend,title,size)
set var(legend,title,weight) $analysisplot(legend,title,weight)
@@ -73,7 +72,13 @@ proc PlotLoadConfigFile {varname filename} {
set var(axis,font,weight) $analysisplot(axis,font,weight)
set var(axis,font,slant) $analysisplot(axis,font,slant)
-# set var(graph,ds,name) {}
+ # per Graph
+ set var(graph,legend) $analysisplot(legend)
+ set var(graph,legend,title) $analysisplot(legend,title)
+ set var(graph,legend,position) $analysisplot(legend,position)
+
+ # per Dataset
+ # set var(graph,ds,name) {}
set var(graph,ds,show) $analysisplot(show)
set var(graph,ds,smooth) $analysisplot(smooth)
set var(graph,ds,color) $analysisplot(color)
@@ -93,8 +98,6 @@ proc PlotLoadConfigFile {varname filename} {
set var(graph,ds,bar,relief) $analysisplot(bar,relief)
- set var(graph,bar,mode) $analysisplot(bar,mode)
-
unset analysisplot
# backward compatibility
@@ -215,6 +218,7 @@ proc PlotSaveConfigFile {varname filename} {
set ch [open $filename w]
set analysisplot(graph,bg) $var(graph,bg)
+ set analysisplot(bar,mode) $var(bar,mode)
set analysisplot(graph,title) $var(graph,title)
set analysisplot(graph,title,family) $var(graph,title,family)
@@ -222,9 +226,6 @@ proc PlotSaveConfigFile {varname filename} {
set analysisplot(graph,title,weight) $var(graph,title,weight)
set analysisplot(graph,title,slant) $var(graph,title,slant)
- set analysisplot(legend) $var(legend)
- set analysisplot(legend,title) $var(legend,title)
- set analysisplot(legend,position) $var(legend,position)
set analysisplot(legend,title,family) $var(legend,title,family)
set analysisplot(legend,title,size) $var(legend,title,size)
set analysisplot(legend,title,weight) $var(legend,title,weight)
@@ -262,6 +263,12 @@ proc PlotSaveConfigFile {varname filename} {
set analysisplot(axis,font,weight) $var(axis,font,weight)
set analysisplot(axis,font,slant) $var(axis,font,slant)
+ # per Graph
+ set analysisplot(legend) $var(graph,legend)
+ set analysisplot(legend,title) $var(graph,legend,title)
+ set analysisplot(legend,position) $var(graph,legend,position)
+
+ # per Dataset
# set analysisplot(name) {}
set analysisplot(show) $var(graph,ds,show)
set analysisplot(smooth) $var(graph,ds,smooth)
@@ -282,8 +289,6 @@ proc PlotSaveConfigFile {varname filename} {
set analysisplot(bar,relief) $var(graph,ds,bar,relief)
- set analysisplot(bar,mode) $var(graph$cc,bar,mode)
-
puts $ch "array set analysisplot \{ [array get analysisplot] \}"
close $ch
}
diff --git a/ds9/library/plotdialog.tcl b/ds9/library/plotdialog.tcl
index 45891a4..555986d 100644
--- a/ds9/library/plotdialog.tcl
+++ b/ds9/library/plotdialog.tcl
@@ -202,20 +202,20 @@ proc PlotDialog {varname wtt title xaxis yaxis} {
menu $var(mb).graph.legend
$var(mb).graph.legend add checkbutton -label [msgcat::mc {Show}] \
- -variable ${varname}(legend) \
+ -variable ${varname}(graph,legend) \
-command [list $var(proc,updategraph) $varname]
$var(mb).graph.legend add separator
$var(mb).graph.legend add radiobutton -label [msgcat::mc {Right}] \
- -variable ${varname}(legend,position) -value right \
+ -variable ${varname}(graph,legend,position) -value right \
-command [list $var(proc,updategraph) $varname]
$var(mb).graph.legend add radiobutton -label [msgcat::mc {Left}] \
- -variable ${varname}(legend,position) -value left \
+ -variable ${varname}(graph,legend,position) -value left \
-command [list $var(proc,updategraph) $varname]
$var(mb).graph.legend add radiobutton -label [msgcat::mc {Top}] \
- -variable ${varname}(legend,position) -value top \
+ -variable ${varname}(graph,legend,position) -value top \
-command [list $var(proc,updategraph) $varname]
$var(mb).graph.legend add radiobutton -label [msgcat::mc {Bottom}] \
- -variable ${varname}(legend,position) -value bottom \
+ -variable ${varname}(graph,legend,position) -value bottom \
-command [list $var(proc,updategraph) $varname]
# dataset
@@ -373,7 +373,7 @@ proc PlotGraphTitleDialog {varname} {
set ed(graph,title) $var(graph,title)
set ed(axis,x,title) $var(axis,x,title)
set ed(axis,y,title) $var(axis,y,title)
- set ed(legend,title) $var(legend,title)
+ set ed(graph,legend,title) $var(graph,legend,title)
DialogCreate $w [msgcat::mc {Title}] ed(ok)
@@ -386,7 +386,7 @@ proc PlotGraphTitleDialog {varname} {
ttk::label $f.ylabel -text [msgcat::mc {Y Axis Title}]
ttk::entry $f.ytitle -textvariable ed(axis,y,title) -width 30
ttk::label $f.legendlabel -text [msgcat::mc {Legend Title}]
- ttk::entry $f.legendtitle -textvariable ed(legend,title) -width 30
+ ttk::entry $f.legendtitle -textvariable ed(graph,legend,title) -width 30
grid $f.label $f.title -padx 2 -pady 2 -sticky ew
grid $f.xlabel $f.xtitle -padx 2 -pady 2 -sticky ew
@@ -416,7 +416,7 @@ proc PlotGraphTitleDialog {varname} {
set var(graph,title) $ed(graph,title)
set var(axis,x,title) $ed(axis,x,title)
set var(axis,y,title) $ed(axis,y,title)
- set var(legend,title) $ed(legend,title)
+ set var(graph,legend,title) $ed(graph,legend,title)
$var(proc,updategraph) $varname
}
diff --git a/ds9/library/plotline.tcl b/ds9/library/plotline.tcl
index 3ff098f..6cc2b6d 100644
--- a/ds9/library/plotline.tcl
+++ b/ds9/library/plotline.tcl
@@ -43,6 +43,7 @@ proc PlotLineDialog {varname wtt title xaxis yaxis} {
global $varname
set var(proc,addgraph) PlotLineAddGraph
+ set var(proc,updatecanvas) PlotUpdateCanvas
set var(proc,updategraph) PlotUpdateGraph
set var(proc,updateelement) PlotLineUpdateElement
set var(proc,highlite) PlotLineHighliteElement
@@ -214,13 +215,3 @@ proc PlotLineUpdateElement {varname} {
-errorbarwidth $var(graph,ds,error,width) -errorbarcap $cap
}
-proc PlotLineButton {varname x y} {
- upvar #0 $varname var
- global $varname
-}
-
-proc PlotLineHighliteElement {varname rowlist} {
- upvar #0 $varname var
- global $varname
-}
-
diff --git a/ds9/library/plotprocess.tcl b/ds9/library/plotprocess.tcl
index 8c5d5a7..69c6633 100644
--- a/ds9/library/plotprocess.tcl
+++ b/ds9/library/plotprocess.tcl
@@ -274,6 +274,14 @@ proc PlotCmdSaveConfig {fn} {
}
}
+proc PlotCmdUpdateCanvas {which value} {
+ global cvarname
+ upvar #0 $cvarname cvar
+
+ set cvar($which) $value
+ $cvar(proc,updatecanvas) $cvarname
+}
+
proc PlotCmdUpdateGraph {which value} {
global cvarname
upvar #0 $cvarname cvar
diff --git a/ds9/library/plotscatter.tcl b/ds9/library/plotscatter.tcl
index 96f34ff..1f89ecb 100644
--- a/ds9/library/plotscatter.tcl
+++ b/ds9/library/plotscatter.tcl
@@ -43,6 +43,7 @@ proc PlotScatterDialog {varname wtt title xaxis yaxis} {
global $varname
set var(proc,addgraph) PlotScatterAddGraph
+ set var(proc,updatecanvas) PlotUpdateCanvas
set var(proc,updategraph) PlotUpdateGraph
set var(proc,updateelement) PlotScatterUpdateElement
set var(proc,highlite) PlotScatterHighliteElement
diff --git a/ds9/library/plotstate.tcl b/ds9/library/plotstate.tcl
index 19cee55..7e029c8 100644
--- a/ds9/library/plotstate.tcl
+++ b/ds9/library/plotstate.tcl
@@ -10,6 +10,8 @@ proc PlotDefState {} {
# per Canvas
set pap(graph,bg) white
+ set pap(bar,mode) normal
+
set pap(graph,title,family) helvetica
set pap(graph,title,size) 12
set pap(graph,title,weight) normal
@@ -34,13 +36,6 @@ proc PlotDefState {} {
set pap(axis,font,weight) normal
set pap(axis,font,slant) roman
- # per Graph
- set pap(graph,title) {}
-
- set pap(legend) 0
- set pap(legend,title) Legend
- set pap(legend,position) right
-
set pap(axis,x,title) {}
set pap(axis,x,grid) 1
set pap(axis,x,log) 0
@@ -59,7 +54,12 @@ proc PlotDefState {} {
set pap(axis,y,max) {}
set pap(axis,y,format) {}
- set pap(bar,mode) normal
+ set pap(graph,title) {}
+
+ # per Graph
+ set pap(graph,legend) 0
+ set pap(graph,legend,title) Legend
+ set pap(graph,legend,position) right
# per DataSet
set pap(graph,ds,name) {}
@@ -91,8 +91,13 @@ proc PlotInitState {varname} {
set cc $var(graph,current)
+ # per Canvas
+ set var(bar,mode) $pap(bar,mode)
+
# per Graph
- set var(graph$cc,bar,mode) $pap(bar,mode)
+ set var(graph,legend) $pap(graph,legend)
+ set var(graph,legend,title) $pap(graph,legend,title)
+ set var(graph,legend,position) $pap(graph,legend,position)
# per DataSet
set var(graph,ds,name) $pap(graph,ds,name)
@@ -123,6 +128,11 @@ proc PlotSaveState {varname} {
set cc $var(graph,current)
set nn $var(graph$cc,data,current)
+ # per Graph
+ set var(graph$cc,legend) $var(graph,legend)
+ set var(graph$cc,legend,title) $var(graph,legend,title)
+ set var(graph$cc,legend,position) $var(graph,legend,position)
+
# per DataSet
set var(graph$cc,$nn,name) $var(graph,ds,name)
set var(graph$cc,$nn,show) $var(graph,ds,show)
@@ -152,6 +162,11 @@ proc PlotRestoreState {varname nn} {
set cc $var(graph,current)
set nn $var(graph$cc,data,current)
+ # per Graph
+ set var(graph,legend) $var(graph$cc,legend)
+ set var(graph,legend,title) $var(graph$cc,legend,title)
+ set var(graph,legend,position) $var(graph$cc,legend,position)
+
# per DataSet
set var(graph,ds,name) $var(graph$cc,$nn,name)
set var(graph,ds,show) $var(graph$cc,$nn,show)
diff --git a/ds9/library/prefs.tcl b/ds9/library/prefs.tcl
index 8b24a73..4563a08 100644
--- a/ds9/library/prefs.tcl
+++ b/ds9/library/prefs.tcl
@@ -464,7 +464,8 @@ proc FixPrefs {version} {
FixPrefs7.3to7.4
FixPrefs7.4to7.5
FixPrefs7.5to7.6
- FixPrefs7.6to8.1
+ FixPrefs7.6to8.0
+ FixPrefs8.0to8.1
}
6.0 {
FixPrefs6.0to6.1
@@ -476,7 +477,8 @@ proc FixPrefs {version} {
FixPrefs7.3to7.4
FixPrefs7.4to7.5
FixPrefs7.5to7.6
- FixPrefs7.6to8.1
+ FixPrefs7.6to8.0
+ FixPrefs8.0to8.1
}
6.1 -
6.1.1 -
@@ -489,7 +491,8 @@ proc FixPrefs {version} {
FixPrefs7.3to7.4
FixPrefs7.4to7.5
FixPrefs7.5to7.6
- FixPrefs7.6to8.1
+ FixPrefs7.6to8.0
+ FixPrefs8.0to8.1
}
6.2 {
FixPrefs6.2to7.0
@@ -499,7 +502,8 @@ proc FixPrefs {version} {
FixPrefs7.3to7.4
FixPrefs7.4to7.5
FixPrefs7.5to7.6
- FixPrefs7.6to8.1
+ FixPrefs7.6to8.0
+ FixPrefs8.0to8.1
}
7.0 {
FixPrefs7.0to7.1
@@ -508,7 +512,8 @@ proc FixPrefs {version} {
FixPrefs7.3to7.4
FixPrefs7.4to7.5
FixPrefs7.5to7.6
- FixPrefs7.6to8.1
+ FixPrefs7.6to8.0
+ FixPrefs8.0to8.1
}
7.1 {
FixPrefs7.1to7.2
@@ -516,14 +521,16 @@ proc FixPrefs {version} {
FixPrefs7.3to7.4
FixPrefs7.4to7.5
FixPrefs7.5to7.6
- FixPrefs7.6to8.1
+ FixPrefs7.6to8.0
+ FixPrefs8.0to8.1
}
7.2 {
FixPrefs7.2to7.3
FixPrefs7.3to7.4
FixPrefs7.4to7.5
FixPrefs7.5to7.6
- FixPrefs7.6to8.1
+ FixPrefs7.6to8.0
+ FixPrefs8.0to8.1
}
7.3 -
7.3.1 -
@@ -531,28 +538,34 @@ proc FixPrefs {version} {
FixPrefs7.3to7.4
FixPrefs7.4to7.5
FixPrefs7.5to7.6
- FixPrefs7.6to8.1
+ FixPrefs7.6to8.0
+ FixPrefs8.0to8.1
}
7.4 {
FixPrefs7.4to7.5
FixPrefs7.5to7.6
- FixPrefs7.6to8.1
+ FixPrefs7.6to8.0
+ FixPrefs8.0to8.1
}
7.5 {
FixPrefs7.5to7.6
- FixPrefs7.6to8.1
+ FixPrefs7.6to8.0
+ FixPrefs8.0to8.1
}
7.6 {
- FixPrefs7.6to8.1
+ FixPrefs7.6to8.0
+ FixPrefs8.0to8.1
}
8.0 {
- FixPrefs7.6to8.1
+ FixPrefs7.6to8.0
+ FixPrefs8.0to8.1
}
}
}
-proc FixPrefs7.6to8.1 {} {
+proc FixPrefs8.0to8.1 {} {
global pap
+
FixVar pap(graph,ds,show) pap(show)
FixVar pap(graph,ds,smooth) pap(smooth)
FixVar pap(graph,ds,color) pap(color)
@@ -573,8 +586,12 @@ proc FixPrefs7.6to8.1 {} {
FixVar pap(graph,ds,bar,relief) pap(relief)
}
+proc FixPrefs7.6to8.0 {} {
+}
+
proc FixPrefs7.5to7.6 {} {
global smooth
+
set smooth(radius,minor) $smooth(radius)
set smooth(sigma) [expr int($smooth(radius)/2.)]
set smooth(sigma,minor) $smooth(sigma)
@@ -589,6 +606,7 @@ proc FixPrefs7.3to7.4 {} {
proc FixPrefs7.2to7.3 {} {
global current
+
if {$current(mode) == {pointer}} {
set current(mode) region
}
@@ -662,6 +680,7 @@ proc FixPrefs7.1to7.2 {} {
proc FixPrefs7.0to7.1 {} {
global pap
+
if {[info exists pap(grid)]} {
set pap(grid,x) $pap(grid)
set pap(grid,y) $pap(grid)
diff --git a/ds9/parsers/plotparser.tac b/ds9/parsers/plotparser.tac
index f5d3046..d29fab6 100644
--- a/ds9/parsers/plotparser.tac
+++ b/ds9/parsers/plotparser.tac
@@ -254,7 +254,7 @@ plotCmd : LOAD_ load
| LEGEND_ legend
| FONT_ fontt
| TITLE_ title
- | BARMODE_ barmode {PlotCmdUpdateGraph bar,mode $2}
+ | BARMODE_ barmode {PlotCmdUpdateCanvas bar,mode $2}
| SHOW_ yesno {PlotCmdUpdateElement graph,ds,show $2}
| COLOR_ color
@@ -353,8 +353,8 @@ axis : xy GRID_ yesno {PlotCmdUpdateGraph "axis,$1,grid" $3}
| xy FORMAT_ STRING_ {PlotCmdUpdateGraph "axis,$1,format" $3}
;
-legend : yesno {PlotCmdUpdateGraph legend $1}
- | POSITION_ legendPos {PlotCmdUpdateGraph "legend,position" $2}
+legend : yesno {PlotCmdUpdateGraph graph,legend $1}
+ | POSITION_ legendPos {PlotCmdUpdateGraph graph,legend,position $2}
;
legendPos : RIGHT_ {set _ right}
@@ -391,7 +391,7 @@ fontType : TITLE_ {set _ graph,title}
title : STRING_ {PlotCmdUpdateGraph graph,title $1}
| xy STRING_ {PlotCmdUpdateGraph "axis,$1,title" $2}
| xyaxis STRING_ {PlotCmdUpdateGraph "axis,$1,title" $2}
- | LEGEND_ STRING_ {PlotCmdUpdateGraph legend,title $2}
+ | LEGEND_ STRING_ {PlotCmdUpdateGraph graph,legend,title $2}
;
barmode : NORMAL_ {set _ normal}
@@ -474,7 +474,7 @@ oldGraphRange : xy AUTO_ yesno {PlotCmdUpdateGraph "axis,$1,auto" $3}
oldGraphLabels : TITLE_ STRING_ {PlotCmdUpdateGraph graph,title $2}
| xyaxis STRING_ {PlotCmdUpdateGraph "axis,$1,title" $2}
- | LEGEND_ STRING_ {PlotCmdUpdateGraph legend,title $2}
+ | LEGEND_ STRING_ {PlotCmdUpdateGraph graph,legend,title $2}
;
oldGraphType : LINE_
diff --git a/ds9/parsers/plotparser.tcl b/ds9/parsers/plotparser.tcl
index ffa2f66..082822a 100644
--- a/ds9/parsers/plotparser.tcl
+++ b/ds9/parsers/plotparser.tcl
@@ -5429,7 +5429,7 @@ proc plot::yyparse {} {
78 { ProcessCmdCVAR0 PlotDestroy }
79 { ProcessCmdCVAR mode $2 PlotChangeMode }
81 { PlotCmdUpdateGraph graph,bg $2 }
- 85 { PlotCmdUpdateGraph bar,mode $2 }
+ 85 { PlotCmdUpdateCanvas bar,mode $2 }
86 { PlotCmdUpdateElement graph,ds,show $2 }
88 { PlotCmdUpdateElement graph,ds,fill $2 }
89 { PlotCmdUpdateElement graph,ds,fill,color $2 }
@@ -5487,8 +5487,8 @@ proc plot::yyparse {} {
146 { PlotCmdUpdateGraph "axis,$1,min" $3 }
147 { PlotCmdUpdateGraph "axis,$1,max" $3 }
148 { PlotCmdUpdateGraph "axis,$1,format" $3 }
- 149 { PlotCmdUpdateGraph legend $1 }
- 150 { PlotCmdUpdateGraph "legend,position" $2 }
+ 149 { PlotCmdUpdateGraph graph,legend $1 }
+ 150 { PlotCmdUpdateGraph graph,legend,position $2 }
151 { set _ right }
152 { set _ left }
153 { set _ top }
@@ -5513,7 +5513,7 @@ proc plot::yyparse {} {
172 { PlotCmdUpdateGraph graph,title $1 }
173 { PlotCmdUpdateGraph "axis,$1,title" $2 }
174 { PlotCmdUpdateGraph "axis,$1,title" $2 }
- 175 { PlotCmdUpdateGraph legend,title $2 }
+ 175 { PlotCmdUpdateGraph graph,legend,title $2 }
176 { set _ normal }
177 { set _ stacked }
178 { set _ aligned }
@@ -5557,7 +5557,7 @@ proc plot::yyparse {} {
228 { PlotCmdUpdateGraph "axis,$1,max" $3 }
229 { PlotCmdUpdateGraph graph,title $2 }
230 { PlotCmdUpdateGraph "axis,$1,title" $2 }
- 231 { PlotCmdUpdateGraph legend,title $2 }
+ 231 { PlotCmdUpdateGraph graph,legend,title $2 }
234 { PlotCmdUpdateGraph "axis,x,log" 0; PlotCmdUpdateGraph "axis,y,log" 0 }
235 { PlotCmdUpdateGraph "axis,x,log" 0; PlotCmdUpdateGraph "axis,y,log" 1 }
236 { PlotCmdUpdateGraph "axis,x,log" 1; PlotCmdUpdateGraph "axis,y,log" 0 }
diff --git a/ds9/parsers/plotsendparser.tac b/ds9/parsers/plotsendparser.tac
index bc29cb5..8c7cbe2 100644
--- a/ds9/parsers/plotsendparser.tac
+++ b/ds9/parsers/plotsendparser.tac
@@ -80,7 +80,7 @@ plotCmd : STATS_ {ProcessSendCmdCVAR PlotStatsGenerate}
| LEGEND_ legend
| FONT_ fontt
| TITLE_ title
- | BARMODE_ {PlotSendCmdCVARGet bar,mode}
+ | BARMODE_ {ProcessSendCmdCVARGet bar,mode}
| SHOW_ {ProcessSendCmdCVARYesNo graph,ds,show}
| COLOR_ {ProcessSendCmdCVARGet graph,ds,color}
| FILL_ {ProcessSendCmdCVARGet graph,ds,fill}
@@ -108,8 +108,8 @@ axis : xy GRID_ {ProcessSendCmdCVARYesNo "axis,$1,grid"}
| xy FORMAT_ {ProcessSendCmdCVARGet "axis,$1,format"}
;
-legend : {ProcessSendCmdCVARYesNo legend}
- | POSITION_ {ProcessSendCmdCVARGet legend,position}
+legend : {ProcessSendCmdCVARYesNo graph,legend}
+ | POSITION_ {ProcessSendCmdCVARGet graph,legend,position}
;
fontt : fontType FONT_ {ProcessSendCmdCVARGet "$1,family"}
@@ -140,7 +140,7 @@ fontType : TITLE_ {set _ graph,title}
title : {ProcessSendCmdCVARGet graph,title}
| xy {ProcessSendCmdCVARGet "axis,$1,title"}
| xyaxis {ProcessSendCmdCVARGet "axis,$1,title"}
- | LEGEND_ {ProcessSendCmdCVARGet legend,title}
+ | LEGEND_ {ProcessSendCmdCVARGet graph,legend,title}
;
errorr : {ProcessSendCmdCVARYesNo graph,ds,error}
diff --git a/ds9/parsers/plotsendparser.tcl b/ds9/parsers/plotsendparser.tcl
index b78cf21..0eff675 100644
--- a/ds9/parsers/plotsendparser.tcl
+++ b/ds9/parsers/plotsendparser.tcl
@@ -1490,7 +1490,7 @@ proc plotsend::yyparse {} {
14 { ProcessSendCmdCVAR PlotListGenerate }
15 { ProcessSendCmdCVARGet mode }
17 { ProcessSendCmdCVARGet graph,bg }
- 21 { PlotSendCmdCVARGet bar,mode }
+ 21 { ProcessSendCmdCVARGet bar,mode }
22 { ProcessSendCmdCVARYesNo graph,ds,show }
23 { ProcessSendCmdCVARGet graph,ds,color }
24 { ProcessSendCmdCVARGet graph,ds,fill }
@@ -1509,8 +1509,8 @@ proc plotsend::yyparse {} {
40 { ProcessSendCmdCVARGet "axis,$1,min" }
41 { ProcessSendCmdCVARGet "axis,$1,max" }
42 { ProcessSendCmdCVARGet "axis,$1,format" }
- 43 { ProcessSendCmdCVARYesNo legend }
- 44 { ProcessSendCmdCVARGet legend,position }
+ 43 { ProcessSendCmdCVARYesNo graph,legend }
+ 44 { ProcessSendCmdCVARGet graph,legend,position }
45 { ProcessSendCmdCVARGet "$1,family" }
46 { ProcessSendCmdCVARGet "$1,family" }
47 { ProcessSendCmdCVARGet "$1,size" }
@@ -1531,7 +1531,7 @@ proc plotsend::yyparse {} {
62 { ProcessSendCmdCVARGet graph,title }
63 { ProcessSendCmdCVARGet "axis,$1,title" }
64 { ProcessSendCmdCVARGet "axis,$1,title" }
- 65 { ProcessSendCmdCVARGet legend,title }
+ 65 { ProcessSendCmdCVARGet graph,legend,title }
66 { ProcessSendCmdCVARYesNo graph,ds,error }
67 { ProcessSendCmdCVARYesNo graph,ds,error,cap }
68 { ProcessSendCmdCVARGet graph,ds,error,color }