diff options
Diffstat (limited to 'ds9/library/plotstate.tcl')
-rw-r--r-- | ds9/library/plotstate.tcl | 210 |
1 files changed, 76 insertions, 134 deletions
diff --git a/ds9/library/plotstate.tcl b/ds9/library/plotstate.tcl index 749ddce..07f5cf9 100644 --- a/ds9/library/plotstate.tcl +++ b/ds9/library/plotstate.tcl @@ -9,7 +9,7 @@ proc PlotDefState {} { global pap # per Canvas - set pap(graph,bg) white + set pap(background) white set pap(bar,mode) normal set pap(graph,title,family) helvetica @@ -83,116 +83,58 @@ proc PlotDefState {} { set pap(graph,ds,bar,relief) raised } -proc PlotInitState {varname} { - upvar #0 $varname var - global $varname - - global pap - - set cc $var(graph,current) - - # per Canvas - set var(bar,mode) $pap(bar,mode) - - # per Graph - set var(graph,title) $pap(graph,title) - - 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) - - set var(graph,axis,x,title) $pap(graph,axis,x,title) - set var(graph,axis,x,grid) $pap(graph,axis,x,grid) - set var(graph,axis,x,log) $pap(graph,axis,x,log) - set var(graph,axis,x,flip) $pap(graph,axis,x,flip) - set var(graph,axis,x,auto) $pap(graph,axis,x,auto) - set var(graph,axis,x,min) $pap(graph,axis,x,min) - set var(graph,axis,x,max) $pap(graph,axis,x,max) - set var(graph,axis,x,format) $pap(graph,axis,x,format) - - set var(graph,axis,y,title) $pap(graph,axis,y,title) - set var(graph,axis,y,grid) $pap(graph,axis,y,grid) - set var(graph,axis,y,log) $pap(graph,axis,y,log) - set var(graph,axis,y,flip) $pap(graph,axis,y,flip) - set var(graph,axis,y,auto) $pap(graph,axis,y,auto) - set var(graph,axis,y,min) $pap(graph,axis,y,min) - set var(graph,axis,y,max) $pap(graph,axis,y,max) - set var(graph,axis,y,format) $pap(graph,axis,y,format) - - # per DataSet - 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,ds,shape,symbol) $pap(graph,ds,shape,symbol) - set var(graph,ds,shape,fill) $pap(graph,ds,shape,fill) - set var(graph,ds,shape,color) $pap(graph,ds,shape,color) - - set var(graph,ds,error) $pap(graph,ds,error) - set var(graph,ds,error,cap) $pap(graph,ds,error,cap) - set var(graph,ds,error,color) $pap(graph,ds,error,color) - set var(graph,ds,error,width) $pap(graph,ds,error,width) - - set var(graph,ds,bar,relief) $pap(graph,ds,bar,relief) -} - proc PlotSaveState {varname} { upvar #0 $varname var global $varname set cc $var(graph,current) - set nn $var(graph$cc,data,current) + set nn $var($cc,data,current) # per Graph - set var(graph$cc,title) $var(graph,title) - - 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) - - set var(graph$cc,axis,x,title) $var(graph,axis,x,title) - set var(graph$cc,axis,x,grid) $var(graph,axis,x,grid) - set var(graph$cc,axis,x,log) $var(graph,axis,x,log) - set var(graph$cc,axis,x,flip) $var(graph,axis,x,flip) - set var(graph$cc,axis,x,auto) $var(graph,axis,x,auto) - set var(graph$cc,axis,x,min) $var(graph,axis,x,min) - set var(graph$cc,axis,x,max) $var(graph,axis,x,max) - set var(graph$cc,axis,x,format) $var(graph,axis,x,format) - - set var(graph$cc,axis,y,title) $var(graph,axis,y,title) - set var(graph$cc,axis,y,grid) $var(graph,axis,y,grid) - set var(graph$cc,axis,y,log) $var(graph,axis,y,log) - set var(graph$cc,axis,y,flip) $var(graph,axis,y,flip) - set var(graph$cc,axis,y,auto) $var(graph,axis,y,auto) - set var(graph$cc,axis,y,min) $var(graph,axis,y,min) - set var(graph$cc,axis,y,max) $var(graph,axis,y,max) - set var(graph$cc,axis,y,format) $var(graph,axis,y,format) + set var($cc,title) $var(graph,title) + + set var($cc,legend) $var(graph,legend) + set var($cc,legend,title) $var(graph,legend,title) + set var($cc,legend,position) $var(graph,legend,position) + + set var($cc,axis,x,title) $var(graph,axis,x,title) + set var($cc,axis,x,grid) $var(graph,axis,x,grid) + set var($cc,axis,x,log) $var(graph,axis,x,log) + set var($cc,axis,x,flip) $var(graph,axis,x,flip) + set var($cc,axis,x,auto) $var(graph,axis,x,auto) + set var($cc,axis,x,min) $var(graph,axis,x,min) + set var($cc,axis,x,max) $var(graph,axis,x,max) + set var($cc,axis,x,format) $var(graph,axis,x,format) + + set var($cc,axis,y,title) $var(graph,axis,y,title) + set var($cc,axis,y,grid) $var(graph,axis,y,grid) + set var($cc,axis,y,log) $var(graph,axis,y,log) + set var($cc,axis,y,flip) $var(graph,axis,y,flip) + set var($cc,axis,y,auto) $var(graph,axis,y,auto) + set var($cc,axis,y,min) $var(graph,axis,y,min) + set var($cc,axis,y,max) $var(graph,axis,y,max) + set var($cc,axis,y,format) $var(graph,axis,y,format) # per DataSet - 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,ds,shape,symbol) - set var(graph$cc,$nn,shape,fill) $var(graph,ds,shape,fill) - set var(graph$cc,$nn,shape,color) $var(graph,ds,shape,color) - - set var(graph$cc,$nn,error) $var(graph,ds,error) - set var(graph$cc,$nn,error,cap) $var(graph,ds,error,cap) - set var(graph$cc,$nn,error,color) $var(graph,ds,error,color) - set var(graph$cc,$nn,error,width) $var(graph,ds,error,width) - - set var(graph$cc,$nn,bar,relief) $var(graph,ds,bar,relief) + set var($cc,$nn,name) $var(graph,ds,name) + set var($cc,$nn,show) $var(graph,ds,show) + set var($cc,$nn,smooth) $var(graph,ds,smooth) + set var($cc,$nn,color) $var(graph,ds,color) + set var($cc,$nn,fill) $var(graph,ds,fill) + set var($cc,$nn,fill,color) $var(graph,ds,fill,color) + set var($cc,$nn,width) $var(graph,ds,width) + set var($cc,$nn,dash) $var(graph,ds,dash) + + set var($cc,$nn,shape,symbol) $var(graph,ds,shape,symbol) + set var($cc,$nn,shape,fill) $var(graph,ds,shape,fill) + set var($cc,$nn,shape,color) $var(graph,ds,shape,color) + + set var($cc,$nn,error) $var(graph,ds,error) + set var($cc,$nn,error,cap) $var(graph,ds,error,cap) + set var($cc,$nn,error,color) $var(graph,ds,error,color) + set var($cc,$nn,error,width) $var(graph,ds,error,width) + + set var($cc,$nn,bar,relief) $var(graph,ds,bar,relief) } proc PlotRestoreState {varname nn} { @@ -200,42 +142,42 @@ proc PlotRestoreState {varname nn} { global $varname set cc $var(graph,current) - set nn $var(graph$cc,data,current) + set nn $var($cc,data,current) # per Graph - set var(graph,title) $var(graph$cc,title) + set var(graph,title) $var($cc,title) - 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) + set var(graph,legend) $var($cc,legend) + set var(graph,legend,title) $var($cc,legend,title) + set var(graph,legend,position) $var($cc,legend,position) - set var(graph,axis,x,title) $var(graph$cc,axis,x,title) - set var(graph,axis,x,grid) $var(graph$cc,axis,x,grid) - set var(graph,axis,x,log) $var(graph$cc,axis,x,log) - set var(graph,axis,x,flip) $var(graph$cc,axis,x,flip) - set var(graph,axis,x,auto) $var(graph$cc,axis,x,auto) - set var(graph,axis,x,min) $var(graph$cc,axis,x,min) - set var(graph,axis,x,max) $var(graph$cc,axis,x,max) - set var(graph,axis,x,format) $var(graph$cc,axis,x,format) + set var(graph,axis,x,title) $var($cc,axis,x,title) + set var(graph,axis,x,grid) $var($cc,axis,x,grid) + set var(graph,axis,x,log) $var($cc,axis,x,log) + set var(graph,axis,x,flip) $var($cc,axis,x,flip) + set var(graph,axis,x,auto) $var($cc,axis,x,auto) + set var(graph,axis,x,min) $var($cc,axis,x,min) + set var(graph,axis,x,max) $var($cc,axis,x,max) + set var(graph,axis,x,format) $var($cc,axis,x,format) # per DataSet - 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,ds,shape,symbol) $var(graph$cc,$nn,shape,symbol) - set var(graph,ds,shape,fill) $var(graph$cc,$nn,shape,fill) - set var(graph,ds,shape,color) $var(graph$cc,$nn,shape,color) - - set var(graph,ds,error) $var(graph$cc,$nn,error) - set var(graph,ds,error,cap) $var(graph$cc,$nn,error,cap) - set var(graph,ds,error,color) $var(graph$cc,$nn,error,color) - set var(graph,ds,error,width) $var(graph$cc,$nn,error,width) - - set var(graph,ds,bar,relief) $var(graph$cc,$nn,bar,relief) + set var(graph,ds,name) $var($cc,$nn,name) + set var(graph,ds,show) $var($cc,$nn,show) + set var(graph,ds,smooth) $var($cc,$nn,smooth) + set var(graph,ds,color) $var($cc,$nn,color) + set var(graph,ds,fill) $var($cc,$nn,fill) + set var(graph,ds,fill,color) $var($cc,$nn,fill,color) + set var(graph,ds,width) $var($cc,$nn,width) + set var(graph,ds,dash) $var($cc,$nn,dash) + + set var(graph,ds,shape,symbol) $var($cc,$nn,shape,symbol) + set var(graph,ds,shape,fill) $var($cc,$nn,shape,fill) + set var(graph,ds,shape,color) $var($cc,$nn,shape,color) + + set var(graph,ds,error) $var($cc,$nn,error) + set var(graph,ds,error,cap) $var($cc,$nn,error,cap) + set var(graph,ds,error,color) $var($cc,$nn,error,color) + set var(graph,ds,error,width) $var($cc,$nn,error,width) + + set var(graph,ds,bar,relief) $var($cc,$nn,bar,relief) } |