From 5959a83a3b75cf5aacd951809d498158e76028fe Mon Sep 17 00:00:00 2001 From: William Joye Date: Thu, 30 May 2019 16:43:31 -0400 Subject: add multiple plot support --- ds9/library/plot.tcl | 5 ++-- ds9/library/plotbar.tcl | 6 ++-- ds9/library/plotconfig.tcl | 43 ++++++++++++++-------------- ds9/library/plotdata.tcl | 23 ++++++++------- ds9/library/plotdialog.tcl | 8 +++--- ds9/library/plotline.tcl | 42 +++++++++++++-------------- ds9/library/plotscatter.tcl | 6 ++-- ds9/library/plotstate.tcl | 65 +++++++++++++++++++++--------------------- ds9/parsers/plotparser.tac | 30 +++++++++---------- ds9/parsers/plotparser.tcl | 30 +++++++++---------- ds9/parsers/plotsendparser.tac | 16 +++++------ ds9/parsers/plotsendparser.tcl | 16 +++++------ 12 files changed, 146 insertions(+), 144 deletions(-) diff --git a/ds9/library/plot.tcl b/ds9/library/plot.tcl index d372189..3c50877 100644 --- a/ds9/library/plot.tcl +++ b/ds9/library/plot.tcl @@ -55,7 +55,6 @@ proc PlotAddGraph {varname} { set var(graph$cc,data,total) 0 set var(graph$cc,data,current) 0 - set var(graph$cc,name) {} set var(graph$cc,xdata) {} set var(graph$cc,ydata) {} set var(graph$cc,xedata) {} @@ -181,7 +180,7 @@ proc PlotDeleteData {varname} { set var(graph$cc,data,total) 0 set var(graph$cc,data,current) 0 - set var(graph$cc,name) {} + set var(graph,ds,name) {} set var(graph$cc,xdata) {} set var(graph$cc,ydata) {} set var(graph$cc,xedata) {} @@ -350,7 +349,7 @@ proc PlotExternal {varname} { set nn $var(graph$cc,data,total) set var(graph$cc,data,current) $nn - set var(graph$cc,name) "Dataset $nn" + set var(graph,ds,name) "Dataset $nn" set var(graph$cc,$nn,manage) $var(graph$cc,manage) set var(graph$cc,$nn,dim) $var(graph$cc,dim) diff --git a/ds9/library/plotbar.tcl b/ds9/library/plotbar.tcl index e9a3795..fcf9c9c 100644 --- a/ds9/library/plotbar.tcl +++ b/ds9/library/plotbar.tcl @@ -76,7 +76,7 @@ proc PlotBarDialog {varname wtt title xaxis yaxis} { # Data $var(mb).data add checkbutton -label [msgcat::mc {Show}] \ - -variable ${varname}(graph$cc,show) \ + -variable ${varname}(graph,ds,show) \ -command [list PlotBarUpdateElement $varname] $var(mb).data add separator $var(mb).data add cascade -label [msgcat::mc {Color}] \ @@ -189,8 +189,8 @@ proc PlotBarUpdateElement {varname} { set nn $var(graph$cc,data,current) $var(graph$cc) element configure "d-${nn}" \ - -label $var(graph$cc,name) -hide [expr !$var(graph$cc,show)] \ - -relief $var(graph$cc,bar,relief) -color $var(graph$cc,color) \ + -label $var(graph,ds,name) -hide [expr !$var(graph,ds,show)] \ + -relief $var(graph$cc,bar,relief) -color $var(graph,ds,color) \ -showerrorbars $show -errorbarcolor $var(graph$cc,error,color) \ -errorbarwidth $var(graph$cc,error,width) -errorbarcap $cap } diff --git a/ds9/library/plotconfig.tcl b/ds9/library/plotconfig.tcl index 0a94498..98c2604 100644 --- a/ds9/library/plotconfig.tcl +++ b/ds9/library/plotconfig.tcl @@ -73,14 +73,14 @@ 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$cc,name) {} - set var(graph$cc,show) $analysisplot(show) - set var(graph$cc,smooth) $analysisplot(smooth) - set var(graph$cc,color) $analysisplot(color) - set var(graph$cc,fill) $analysisplot(fill) - set var(graph$cc,fill,color) $analysisplot(fill,color) - set var(graph$cc,width) $analysisplot(width) - set var(graph$cc,dash) $analysisplot(dash) +# 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) + set var(graph,ds,fill) $analysisplot(fill) + set var(graph,ds,fill,color) $analysisplot(fill,color) + set var(graph,ds,width) $analysisplot(width) + set var(graph,ds,dash) $analysisplot(dash) set var(graph$cc,shape,symbol) $analysisplot(shape,symbol) set var(graph$cc,shape,fill) $analysisplot(shape,fill) @@ -119,15 +119,16 @@ proc PlotLoadConfigFile {varname filename} { FixVar ${varname}(axis,font,weight) ${varname}(numlabWeight) FixVar ${varname}(axis,font,slant) ${varname}(numlabSlant) - FixVar ${varname}(graph$cc,show) ${varname}(linear) - FixVar ${varname}(graph$cc,shape,color) ${varname}(discrete,color) - FixVar ${varname}(graph$cc,shape,fill) ${varname}(discrete,fill) - FixVar ${varname}(graph$cc,width) ${varname}(linear,width) - FixVar ${varname}(graph$cc,color) ${varname}(linear,color) + FixVar ${varname}(graph,ds,show) ${varname}(linear) + FixVar ${varname}(graph,ds,width) ${varname}(linear,width) + FixVar ${varname}(graph,ds,color) ${varname}(linear,color) if {[info exists ${varname}(linear,dash)]} { set var(linear,dash) [FromYesNo $var(linear,dash)] } - FixVar ${varname}(graph$cc,dash) ${varname}(linear,dash) + FixVar ${varname}(graph,ds,dash) ${varname}(linear,dash) + + FixVar ${varname}(graph$cc,shape,color) ${varname}(discrete,color) + FixVar ${varname}(graph$cc,shape,fill) ${varname}(discrete,fill) if {[info exists ${varname}(discrete)]} { if {$var(discrete)} { @@ -261,13 +262,13 @@ proc PlotSaveConfigFile {varname filename} { set analysisplot(axis,font,slant) $var(axis,font,slant) # set analysisplot(name) {} - set analysisplot(show) $var(graph$cc,show) - set analysisplot(smooth) $var(graph$cc,smooth) - set analysisplot(color) $var(graph$cc,color) - set analysisplot(fill) $var(graph$cc,fill) - set analysisplot(fill,color) $var(graph$cc,fill,color) - set analysisplot(width) $var(graph$cc,width) - set analysisplot(dash) $var(graph$cc,dash) + set analysisplot(show) $var(graph,ds,show) + set analysisplot(smooth) $var(graph,ds,smooth) + set analysisplot(color) $var(graph,ds,color) + set analysisplot(fill) $var(graph,ds,fill) + set analysisplot(fill,color) $var(graph,ds,fill,color) + set analysisplot(width) $var(graph,ds,width) + set analysisplot(dash) $var(graph,ds,dash) set analysisplot(shape,symbol) $var(graph$cc,shape,symbol) set analysisplot(shape,fill) $var(graph$cc,shape,fill) diff --git a/ds9/library/plotdata.tcl b/ds9/library/plotdata.tcl index 179ff8e..d07dc75 100644 --- a/ds9/library/plotdata.tcl +++ b/ds9/library/plotdata.tcl @@ -114,24 +114,24 @@ proc PlotDataSet {varname dim data} { PlotDataSetOne $varname "4.1" $data # set color - set col $var(graph$cc,color) - set var(graph$cc,color) [PlotNextColor $var(graph$cc,color)] + set col [PlotNextColor $var(graph,ds,color)] # second data set PlotDataSetOne $varname "4.2" $data - set var(graph$cc,color) $col + set var(graph,ds,color) $col + $var(proc,updateelement) $varname } 5 { # first data set PlotDataSetOne $varname "5.1" $data # set color - set col $var(graph$cc,color) - set var(graph$cc,color) [PlotNextColor $var(graph$cc,color)] + set col [PlotNextColor $var(graph,ds,color)] # second data set PlotDataSetOne $varname "5.2" $data - set var(graph$cc,color) $col + set var(graph,ds,color) $col + $var(proc,updateelement) $varname } default {PlotDataSetOne $varname $dim $data} } @@ -171,7 +171,7 @@ proc PlotDataSetOne {varname dim data} { # basics xy set var(graph$cc,manage) 1 - set var(graph$cc,name) "Dataset $nn" + set var(graph,ds,name) "Dataset $nn" set var(graph$cc,xdata) $xdata set var(graph$cc,ydata) $ydata global $var(graph$cc,xdata) $var(graph$cc,ydata) @@ -337,7 +337,7 @@ proc PlotDataSetOne {varname dim data} { PlotSaveState $varname # update data set menu - $var(mb).graph.select add radiobutton -label "$var(graph$cc,name)" \ + $var(mb).graph.select add radiobutton -label "$var(graph,ds,name)" \ -variable ${varname}(graph$cc,data,current) -value $nn \ -command [list PlotCurrentData $varname] @@ -389,9 +389,6 @@ proc PlotDupData {varname mm} { set var(graph$cc,$nn,dim) $var(graph$cc,$mm,dim) set var(graph$cc,$nn,show) $var(graph$cc,$mm,show) - set var(graph$cc,$nn,shape,symbol) $var(graph$cc,$mm,shape,symbol) - set var(graph$cc,$nn,shape,fill) $var(graph$cc,$mm,shape,fill) - set var(graph$cc,$nn,shape,color) $var(graph$cc,$mm,shape,color) set var(graph$cc,$nn,smooth) $var(graph$cc,$mm,smooth) set var(graph$cc,$nn,color) [PlotNextColor $var(graph$cc,$mm,color)] set var(graph$cc,$nn,fill) $var(graph$cc,$mm,fill) @@ -400,6 +397,10 @@ proc PlotDupData {varname mm} { set var(graph$cc,$nn,width) $var(graph$cc,$mm,width) set var(graph$cc,$nn,dash) $var(graph$cc,$mm,dash) + set var(graph$cc,$nn,shape,symbol) $var(graph$cc,$mm,shape,symbol) + set var(graph$cc,$nn,shape,fill) $var(graph$cc,$mm,shape,fill) + set var(graph$cc,$nn,shape,color) $var(graph$cc,$mm,shape,color) + set var(graph$cc,$nn,error) $var(graph$cc,$mm,error) set var(graph$cc,$nn,error,cap) $var(graph$cc,$mm,error,cap) set var(graph$cc,$nn,error,color) $var(graph$cc,$mm,error,color) diff --git a/ds9/library/plotdialog.tcl b/ds9/library/plotdialog.tcl index 38ce1b1..5fabb2b 100644 --- a/ds9/library/plotdialog.tcl +++ b/ds9/library/plotdialog.tcl @@ -437,7 +437,7 @@ proc DatasetNameDialog {varname} { set w {.aptitle} set ed(ok) 0 - set ed(name) $var(graph$cc,name) + set ed(name) $var(graph,ds,name) DialogCreate $w [msgcat::mc {Data}] ed(ok) @@ -468,9 +468,9 @@ proc DatasetNameDialog {varname} { DialogDismiss $w if {$ed(ok)} { - $var(mb).graph.select entryconfig "$var(graph$cc,name)" \ + $var(mb).graph.select entryconfig "$var(graph,ds,name)" \ -label "$ed(name)" - set var(graph$cc,name) $ed(name) + set var(graph,ds,name) $ed(name) $var(proc,updateelement) $varname } @@ -562,7 +562,7 @@ proc PlotShapeMenu {varname} { $var(mb).data.shape add separator $var(mb).data.shape add checkbutton \ -label [msgcat::mc {Fill}] \ - -variable ${varname}(graph$cc,shape,fill) \ + -variable ${varname}(graph,ds,shape,fill) \ -command [list $var(proc,updateelement) $varname] $var(mb).data.shape add cascade -label [msgcat::mc {Color}] \ -menu $var(mb).data.shape.color diff --git a/ds9/library/plotline.tcl b/ds9/library/plotline.tcl index 3c2a003..b8e13e8 100644 --- a/ds9/library/plotline.tcl +++ b/ds9/library/plotline.tcl @@ -56,7 +56,7 @@ proc PlotLineDialog {varname wtt title xaxis yaxis} { # Data $var(mb).data add checkbutton -label [msgcat::mc {Show}] \ - -variable ${varname}(graph$cc,show) \ + -variable ${varname}(graph,ds,show) \ -command [list PlotLineUpdateElement $varname] $var(mb).data add separator $var(mb).data add cascade -label [msgcat::mc {Shape}] \ @@ -82,56 +82,56 @@ proc PlotLineDialog {varname wtt title xaxis yaxis} { menu $var(mb).data.smooth $var(mb).data.smooth add radiobutton \ -label [msgcat::mc {Step}] \ - -variable ${varname}(graph$cc,smooth) -value step \ + -variable ${varname}(graph,ds,smooth) -value step \ -command [list PlotLineUpdateElement $varname] $var(mb).data.smooth add radiobutton \ -label [msgcat::mc {Linear}] \ - -variable ${varname}(graph$cc,smooth) -value linear \ + -variable ${varname}(graph,ds,smooth) -value linear \ -command [list PlotLineUpdateElement $varname] $var(mb).data.smooth add radiobutton \ -label [msgcat::mc {Cubic}] \ - -variable ${varname}(graph$cc,smooth) -value cubic \ + -variable ${varname}(graph,ds,smooth) -value cubic \ -command [list PlotLineUpdateElement $varname] $var(mb).data.smooth add radiobutton \ -label [msgcat::mc {Quadratic}] \ - -variable ${varname}(graph$cc,smooth) -value quadratic \ + -variable ${varname}(graph,ds,smooth) -value quadratic \ -command [list PlotLineUpdateElement $varname] $var(mb).data.smooth add radiobutton \ -label [msgcat::mc {Catrom}] \ - -variable ${varname}(graph$cc,smooth) -value catrom \ + -variable ${varname}(graph,ds,smooth) -value catrom \ -command [list PlotLineUpdateElement $varname] # Color - PlotColorMenu $var(mb).data.color $varname graph$cc,color \ + PlotColorMenu $var(mb).data.color $varname graph,ds,color \ [list PlotLineUpdateElement $varname] # Width menu $var(mb).data.width $var(mb).data.width add radiobutton \ - -label {0} -variable ${varname}(graph$cc,width) \ + -label {0} -variable ${varname}(graph,ds,width) \ -value 0 -command [list PlotLineUpdateElement $varname] $var(mb).data.width add radiobutton \ - -label {1} -variable ${varname}(graph$cc,width) \ + -label {1} -variable ${varname}(graph,ds,width) \ -value 1 -command [list PlotLineUpdateElement $varname] $var(mb).data.width add radiobutton \ - -label {2} -variable ${varname}(graph$cc,width) \ + -label {2} -variable ${varname}(graph,ds,width) \ -value 2 -command [list PlotLineUpdateElement $varname] $var(mb).data.width add radiobutton \ - -label {3} -variable ${varname}(graph$cc,width) \ + -label {3} -variable ${varname}(graph,ds,width) \ -value 3 -command [list PlotLineUpdateElement $varname] $var(mb).data.width add radiobutton \ - -label {4} -variable ${varname}(graph$cc,width) \ + -label {4} -variable ${varname}(graph,ds,width) \ -value 4 -command [list PlotLineUpdateElement $varname] $var(mb).data.width add separator $var(mb).data.width add checkbutton \ - -label [msgcat::mc {Dash}] -variable ${varname}(graph$cc,dash) \ + -label [msgcat::mc {Dash}] -variable ${varname}(graph,ds,dash) \ -command [list PlotLineUpdateElement $varname] # Fill menu $var(mb).data.fill $var(mb).data.fill add checkbutton \ -label [msgcat::mc {Show}] \ - -variable ${varname}(graph$cc,fill) \ + -variable ${varname}(graph,ds,fill) \ -command [list PlotLineUpdateElement $varname] $var(mb).data.fill add separator $var(mb).data.fill add cascade -label [msgcat::mc {Color}] \ @@ -172,8 +172,8 @@ proc PlotLineUpdateElement {varname} { PlotSaveState $varname - if {$var(graph$cc,fill)} { - set fillClr $var(graph$cc,fill,color) + if {$var(graph,ds,fill)} { + set fillClr $var(graph,ds,fill,color) } else { set fillClr {} } @@ -184,7 +184,7 @@ proc PlotLineUpdateElement {varname} { set clr {} } - if {$var(graph$cc,dash)} { + if {$var(graph,ds,dash)} { set dash {8 3} } else { set dash { } @@ -204,12 +204,12 @@ proc PlotLineUpdateElement {varname} { set nn $var(graph$cc,data,current) $var(graph$cc) element configure "d-${nn}" \ - -label $var(graph$cc,name) -hide [expr !$var(graph$cc,show)] \ + -label $var(graph,ds,name) -hide [expr !$var(graph,ds,show)] \ -symbol $var(graph$cc,shape,symbol) -fill $clr -scalesymbols no \ -pixels 5 -outline $var(graph$cc,shape,color) \ - -smooth $var(graph$cc,smooth) \ - -color $var(graph$cc,color) -areabackground $fillClr \ - -linewidth $var(graph$cc,width) -dashes $dash \ + -smooth $var(graph,ds,smooth) \ + -color $var(graph,ds,color) -areabackground $fillClr \ + -linewidth $var(graph,ds,width) -dashes $dash \ -showerrorbars $show -errorbarcolor $var(graph$cc,error,color) \ -errorbarwidth $var(graph$cc,error,width) -errorbarcap $cap } diff --git a/ds9/library/plotscatter.tcl b/ds9/library/plotscatter.tcl index 4bd19f4..d129a63 100644 --- a/ds9/library/plotscatter.tcl +++ b/ds9/library/plotscatter.tcl @@ -56,7 +56,7 @@ proc PlotScatterDialog {varname wtt title xaxis yaxis} { # Data $var(mb).data add checkbutton -label [msgcat::mc {Show}] \ - -variable ${varname}(graph$cc,show) \ + -variable ${varname}(graph,ds,show) \ -command [list PlotScatterUpdateElement $varname] $var(mb).data add separator $var(mb).data add cascade -label [msgcat::mc {Shape}] \ @@ -126,7 +126,7 @@ proc PlotScatterUpdateElement {varname} { set nn $var(graph$cc,data,current) $var(graph$cc) element configure "d-${nn}" \ - -label $var(graph$cc,name) -hide [expr !$var(graph$cc,show)] \ + -label $var(graph,ds,name) -hide [expr !$var(graph,ds,show)] \ -symbol $var(graph$cc,shape,symbol) -fill $clr -scalesymbols no \ -outline $var(graph$cc,shape,color) \ -linewidth 0 -pixels 5 \ @@ -183,7 +183,7 @@ proc PlotScatterHighliteElement {varname rowlist} { return } - if {$var(graph$cc,show)} { + if {$var(graph,ds,show)} { $var(graph$cc) element deactivate d-1 if {$rowlist != {}} { # can have multiple rows diff --git a/ds9/library/plotstate.tcl b/ds9/library/plotstate.tcl index 7c41bbd..333679d 100644 --- a/ds9/library/plotstate.tcl +++ b/ds9/library/plotstate.tcl @@ -62,14 +62,14 @@ proc PlotDefState {} { set pap(bar,mode) normal # per DataSet - set pap(name) {} - set pap(show) 1 - set pap(smooth) linear - set pap(color) black - set pap(fill) 0 - set pap(fill,color) black - set pap(width) 1 - set pap(dash) 0 + set pap(graph,ds,name) {} + set pap(graph,ds,show) 1 + set pap(graph,ds,smooth) linear + set pap(graph,ds,color) black + set pap(graph,ds,fill) 0 + set pap(graph,ds,fill,color) black + set pap(graph,ds,width) 1 + set pap(graph,ds,dash) 0 set pap(shape,symbol) none set pap(shape,fill) 1 @@ -95,17 +95,18 @@ proc PlotInitState {varname} { set var(graph$cc,bar,mode) $pap(bar,mode) # per DataSet - set var(graph$cc,name) $pap(name) - set var(graph$cc,show) $pap(show) + set var(graph,ds,name) $pap(graph,ds,name) + set var(graph,ds,show) $pap(graph,ds,show) + set var(graph,ds,smooth) $pap(graph,ds,smooth) + set var(graph,ds,color) $pap(graph,ds,color) + set var(graph,ds,fill) $pap(graph,ds,fill) + set var(graph,ds,fill,color) $pap(graph,ds,fill,color) + set var(graph,ds,width) $pap(graph,ds,width) + set var(graph,ds,dash) $pap(graph,ds,dash) + set var(graph$cc,shape,symbol) $pap(shape,symbol) set var(graph$cc,shape,fill) $pap(shape,fill) set var(graph$cc,shape,color) $pap(shape,color) - set var(graph$cc,smooth) $pap(smooth) - set var(graph$cc,color) $pap(color) - set var(graph$cc,fill) $pap(fill) - set var(graph$cc,fill,color) $pap(fill,color) - set var(graph$cc,width) $pap(width) - set var(graph$cc,dash) $pap(dash) set var(graph$cc,error) $pap(error) set var(graph$cc,error,cap) $pap(error,cap) @@ -123,14 +124,14 @@ proc PlotSaveState {varname} { set nn $var(graph$cc,data,current) # per DataSet - set var(graph$cc,$nn,name) $var(graph$cc,name) - set var(graph$cc,$nn,show) $var(graph$cc,show) - set var(graph$cc,$nn,smooth) $var(graph$cc,smooth) - set var(graph$cc,$nn,color) $var(graph$cc,color) - set var(graph$cc,$nn,fill) $var(graph$cc,fill) - set var(graph$cc,$nn,fill,color) $var(graph$cc,fill,color) - set var(graph$cc,$nn,width) $var(graph$cc,width) - set var(graph$cc,$nn,dash) $var(graph$cc,dash) + set var(graph$cc,$nn,name) $var(graph,ds,name) + set var(graph$cc,$nn,show) $var(graph,ds,show) + set var(graph$cc,$nn,smooth) $var(graph,ds,smooth) + set var(graph$cc,$nn,color) $var(graph,ds,color) + set var(graph$cc,$nn,fill) $var(graph,ds,fill) + set var(graph$cc,$nn,fill,color) $var(graph,ds,fill,color) + set var(graph$cc,$nn,width) $var(graph,ds,width) + set var(graph$cc,$nn,dash) $var(graph,ds,dash) set var(graph$cc,$nn,shape,symbol) $var(graph$cc,shape,symbol) set var(graph$cc,$nn,shape,fill) $var(graph$cc,shape,fill) @@ -152,14 +153,14 @@ proc PlotRestoreState {varname nn} { set nn $var(graph$cc,data,current) # per DataSet - set var(graph$cc,name) $var(graph$cc,$nn,name) - set var(graph$cc,show) $var(graph$cc,$nn,show) - set var(graph$cc,smooth) $var(graph$cc,$nn,smooth) - set var(graph$cc,color) $var(graph$cc,$nn,color) - set var(graph$cc,fill) $var(graph$cc,$nn,fill) - set var(graph$cc,fill,color) $var(graph$cc,$nn,fill,color) - set var(graph$cc,width) $var(graph$cc,$nn,width) - set var(graph$cc,dash) $var(graph$cc,$nn,dash) + set var(graph,ds,name) $var(graph$cc,$nn,name) + set var(graph,ds,show) $var(graph$cc,$nn,show) + set var(graph,ds,smooth) $var(graph$cc,$nn,smooth) + set var(graph,ds,color) $var(graph$cc,$nn,color) + set var(graph,ds,fill) $var(graph$cc,$nn,fill) + set var(graph,ds,fill,color) $var(graph$cc,$nn,fill,color) + set var(graph,ds,width) $var(graph$cc,$nn,width) + set var(graph,ds,dash) $var(graph$cc,$nn,dash) set var(graph$cc,shape,symbol) $var(graph$cc,$nn,shape,symbol) set var(graph$cc,shape,fill) $var(graph$cc,$nn,shape,fill) diff --git a/ds9/parsers/plotparser.tac b/ds9/parsers/plotparser.tac index 21a94f5..a5378d2 100644 --- a/ds9/parsers/plotparser.tac +++ b/ds9/parsers/plotparser.tac @@ -256,19 +256,19 @@ plotCmd : LOAD_ load | TITLE_ title | BARMODE_ barmode {PlotCmdUpdateGraph bar,mode $2} - | SHOW_ yesno {PlotCmdUpdateElement show $2} + | SHOW_ yesno {PlotCmdUpdateElement graph,ds,show $2} | COLOR_ color - | FILL_ yesno {PlotCmdUpdateElement fill $2} - | FILLCOLOR_ STRING_ {PlotCmdUpdateElement fill,color $2} + | FILL_ yesno {PlotCmdUpdateElement graph,ds,fill $2} + | FILLCOLOR_ STRING_ {PlotCmdUpdateElement graph,ds,fill,color $2} | ERROR_ errorr # backward compatibility | ERRORBAR_ errorr - | NAME_ STRING_ {PlotCmdUpdateElement name $2} + | NAME_ STRING_ {PlotCmdUpdateElement graph,ds,name $2} | SHAPE_ shape | RELIEF_ relief {PlotCmdUpdateElement bar,relief $2} - | SMOOTH_ smooth {PlotCmdUpdateElement smooth $2} - | WIDTH_ INT_ {PlotCmdUpdateElement width $2} - | DASH_ yesno {PlotCmdUpdateElement dash $2} + | SMOOTH_ smooth {PlotCmdUpdateElement graph,ds,smooth $2} + | WIDTH_ INT_ {PlotCmdUpdateElement graph,ds,width $2} + | DASH_ yesno {PlotCmdUpdateElement graph,ds,dash $2} | SELECT_ INT_ {PlotCmdSelectData $2} # backward compatibility @@ -400,9 +400,9 @@ barmode : NORMAL_ {set _ normal} | OVERLAP_ {set _ overlap} ; -color : STRING_ {PlotCmdUpdateElement color $1} +color : STRING_ {PlotCmdUpdateElement graph,ds,color $1} # backward compatiabilty - | dummy1 STRING_ {PlotCmdUpdateElement color $2} + | dummy1 STRING_ {PlotCmdUpdateElement graph,ds,color $2} ; dummy1 : DISCRETE_ @@ -489,8 +489,8 @@ oldGraphScale : LINEARLINEAR_ {PlotCmdUpdateGraph "axis,x,log" 0; PlotCmdUpdateG # backward compatibility oldLine : DISCRETE_ shapes {PlotCmdUpdateElement shape,symbol $2} - | dummy2 WIDTH_ INT_ {PlotCmdUpdateElement width $3} - | dummy2 DASH_ yesno {PlotCmdUpdateElement dash $3} + | dummy2 WIDTH_ INT_ {PlotCmdUpdateElement graph,ds,width $3} + | dummy2 DASH_ yesno {PlotCmdUpdateElement graph,ds,dash $3} | dummy2 STYLE_ INT_ {PlotCmdUpdateElement error $3} ; @@ -503,10 +503,10 @@ dummy2 : LINE_ ; # backward compatibility -oldView : DISCRETE_ yesno {PlotCmdUpdateElement show $2} - | LINE_ yesno {PlotCmdUpdateElement show $2; PlotCmdUpdateElement smooth linear} - | STEP_ yesno {PlotCmdUpdateElement show $2; PlotCmdUpdateElement smooth step} - | QUADRATIC_ yesno {PlotCmdUpdateElement show $2; PlotCmdUpdateElement smooth quadratic} +oldView : DISCRETE_ yesno {PlotCmdUpdateElement graph,ds,show $2} + | LINE_ yesno {PlotCmdUpdateElement graph,ds,show $2; PlotCmdUpdateElement graph,ds,smooth linear} + | STEP_ yesno {PlotCmdUpdateElement graph,ds,show $2; PlotCmdUpdateElement graph,ds,smooth step} + | QUADRATIC_ yesno {PlotCmdUpdateElement graph,ds,show $2; PlotCmdUpdateElement graph,ds,smooth quadratic} | ERROR_ yesno {PlotCmdUpdateElement error $2} | ERRORBAR_ yesno {PlotCmdUpdateElement error $2} ; diff --git a/ds9/parsers/plotparser.tcl b/ds9/parsers/plotparser.tcl index 5f3b39a..2f771c4 100644 --- a/ds9/parsers/plotparser.tcl +++ b/ds9/parsers/plotparser.tcl @@ -5430,14 +5430,14 @@ proc plot::yyparse {} { 79 { ProcessCmdCVAR mode $2 PlotChangeMode } 81 { PlotCmdUpdateGraph graph,bg $2 } 85 { PlotCmdUpdateGraph bar,mode $2 } - 86 { PlotCmdUpdateElement show $2 } - 88 { PlotCmdUpdateElement fill $2 } - 89 { PlotCmdUpdateElement fill,color $2 } - 92 { PlotCmdUpdateElement name $2 } + 86 { PlotCmdUpdateElement graph,ds,show $2 } + 88 { PlotCmdUpdateElement graph,ds,fill $2 } + 89 { PlotCmdUpdateElement graph,ds,fill,color $2 } + 92 { PlotCmdUpdateElement graph,ds,name $2 } 94 { PlotCmdUpdateElement bar,relief $2 } - 95 { PlotCmdUpdateElement smooth $2 } - 96 { PlotCmdUpdateElement width $2 } - 97 { PlotCmdUpdateElement dash $2 } + 95 { PlotCmdUpdateElement graph,ds,smooth $2 } + 96 { PlotCmdUpdateElement graph,ds,width $2 } + 97 { PlotCmdUpdateElement graph,ds,dash $2 } 98 { PlotCmdSelectData $2 } 99 { PlotCmdSelectData $2 } 102 { PlotCmdExport [ExtToFormat $1] $1 } @@ -5518,8 +5518,8 @@ proc plot::yyparse {} { 177 { set _ stacked } 178 { set _ aligned } 179 { set _ overlap } - 180 { PlotCmdUpdateElement color $1 } - 181 { PlotCmdUpdateElement color $2 } + 180 { PlotCmdUpdateElement graph,ds,color $1 } + 181 { PlotCmdUpdateElement graph,ds,color $2 } 189 { PlotCmdUpdateElement error $1 } 190 { PlotCmdUpdateElement error,cap $2 } 191 { PlotCmdUpdateElement error,color $2 } @@ -5563,13 +5563,13 @@ proc plot::yyparse {} { 236 { PlotCmdUpdateGraph "axis,x,log" 1; PlotCmdUpdateGraph "axis,y,log" 0 } 237 { PlotCmdUpdateGraph "axis,x,log" 1; PlotCmdUpdateGraph "axis,y,log" 1 } 238 { PlotCmdUpdateElement shape,symbol $2 } - 239 { PlotCmdUpdateElement width $3 } - 240 { PlotCmdUpdateElement dash $3 } + 239 { PlotCmdUpdateElement graph,ds,width $3 } + 240 { PlotCmdUpdateElement graph,ds,dash $3 } 241 { PlotCmdUpdateElement error $3 } - 248 { PlotCmdUpdateElement show $2 } - 249 { PlotCmdUpdateElement show $2; PlotCmdUpdateElement smooth linear } - 250 { PlotCmdUpdateElement show $2; PlotCmdUpdateElement smooth step } - 251 { PlotCmdUpdateElement show $2; PlotCmdUpdateElement smooth quadratic } + 248 { PlotCmdUpdateElement graph,ds,show $2 } + 249 { PlotCmdUpdateElement graph,ds,show $2; PlotCmdUpdateElement graph,ds,smooth linear } + 250 { PlotCmdUpdateElement graph,ds,show $2; PlotCmdUpdateElement graph,ds,smooth step } + 251 { PlotCmdUpdateElement graph,ds,show $2; PlotCmdUpdateElement graph,ds,smooth quadratic } 252 { PlotCmdUpdateElement error $2 } 253 { PlotCmdUpdateElement error $2 } } diff --git a/ds9/parsers/plotsendparser.tac b/ds9/parsers/plotsendparser.tac index 379fe28..87aaf2c 100644 --- a/ds9/parsers/plotsendparser.tac +++ b/ds9/parsers/plotsendparser.tac @@ -81,19 +81,19 @@ plotCmd : STATS_ {ProcessSendCmdCVAR PlotStatsGenerate} | FONT_ fontt | TITLE_ title | BARMODE_ {PlotSendCmdCVARGet bar,mode} - | SHOW_ {PlotSendCmdCVARYesNo show} - | COLOR_ {PlotSendCmdCVARGet color} - | FILL_ {PlotSendCmdCVARGet fill} - | FILLCOLOR_ {PlotSendCmdCVARGet fill,color} + | SHOW_ {ProcessSendCmdCVARYesNo graph,ds,show} + | COLOR_ {ProcessSendCmdCVARGet graph,ds,color} + | FILL_ {ProcessSendCmdCVARGet graph,ds,fill} + | FILLCOLOR_ {ProcessSendCmdCVARGet graph,ds,fill,color} | ERROR_ errorr # backward compatibility | ERRORBAR_ errorr - | NAME_ {PlotSendCmdCVARGet name} + | NAME_ {ProcessSendCmdCVARGet graph,ds,name} | SHAPE_ shape | RELIEF_ {PlotSendCmdCVARGet bar,relief} - | SMOOTH_ {PlotSendCmdCVARGet smooth} - | WIDTH_ {PlotSendCmdCVARGet width} - | DASH_ {PlotSendCmdCVARYesNo dash} + | SMOOTH_ {ProcessSendCmdCVARGet graph,ds,smooth} + | WIDTH_ {ProcessSendCmdCVARGet graph,ds,width} + | DASH_ {ProcessSendCmdCVARYesNo graph,ds,dash} | SELECT_ {PlotSendCmdCVARGet data,current} # backward compatibility | DATASET_ {PlotSendCmdCVARGet data,current} diff --git a/ds9/parsers/plotsendparser.tcl b/ds9/parsers/plotsendparser.tcl index ce58ec1..f154a65 100644 --- a/ds9/parsers/plotsendparser.tcl +++ b/ds9/parsers/plotsendparser.tcl @@ -1491,15 +1491,15 @@ proc plotsend::yyparse {} { 15 { ProcessSendCmdCVARGet mode } 17 { ProcessSendCmdCVARGet graph,bg } 21 { PlotSendCmdCVARGet bar,mode } - 22 { PlotSendCmdCVARYesNo show } - 23 { PlotSendCmdCVARGet color } - 24 { PlotSendCmdCVARGet fill } - 25 { PlotSendCmdCVARGet fill,color } - 28 { PlotSendCmdCVARGet name } + 22 { ProcessSendCmdCVARYesNo graph,ds,show } + 23 { ProcessSendCmdCVARGet graph,ds,color } + 24 { ProcessSendCmdCVARGet graph,ds,fill } + 25 { ProcessSendCmdCVARGet graph,ds,fill,color } + 28 { ProcessSendCmdCVARGet graph,ds,name } 30 { PlotSendCmdCVARGet bar,relief } - 31 { PlotSendCmdCVARGet smooth } - 32 { PlotSendCmdCVARGet width } - 33 { PlotSendCmdCVARYesNo dash } + 31 { ProcessSendCmdCVARGet graph,ds,smooth } + 32 { ProcessSendCmdCVARGet graph,ds,width } + 33 { ProcessSendCmdCVARYesNo graph,ds,dash } 34 { PlotSendCmdCVARGet data,current } 35 { PlotSendCmdCVARGet data,current } 36 { ProcessSendCmdCVARYesNo "axis,$1,grid" } -- cgit v0.12