From f8a1d050c173cf9c101d4ccc3e7038399a03909b Mon Sep 17 00:00:00 2001 From: William Joye Date: Wed, 23 May 2018 15:03:07 -0400 Subject: update ds9 parsers --- ds9/doc/ref/command.html | 9 ++++--- ds9/doc/ref/samp.html | 8 +++--- ds9/doc/ref/xpa.html | 8 +++--- ds9/library/plotprocess.tcl | 59 +++++++++++++++++++++++++++++++++++++++++++++ ds9/parsers/plotparser.tac | 1 + 5 files changed, 73 insertions(+), 12 deletions(-) diff --git a/ds9/doc/ref/command.html b/ds9/doc/ref/command.html index 6053b2a..dc0ed84 100644 --- a/ds9/doc/ref/command.html +++ b/ds9/doc/ref/command.html @@ -3076,7 +3076,8 @@ -    [<plotname>] stats
+    [<plotname>] stats + [yes|no[
      [<plotname>] @@ -3147,7 +3148,7 @@ - list
+ list [yes|no[
      [<plotname>] @@ -4785,8 +4786,8 @@ $ds9 -plot save bar.dat # save current dataset
$ds9 -plot clear # clear all datasets
$ds9 -plot duplicate # duplicate current dataset
- $ds9 -plot stats # display current dataset statistics
- $ds9 -plot list # list current dataset
+ $ds9 -plot stats yes # display current dataset statistics
+ $ds9 -plot list yes # list current dataset
$ds9 -plot loadconfig foo.plt # load plot configuration
$ds9 -plot saveconfig bar.plt # save current plot diff --git a/ds9/doc/ref/samp.html b/ds9/doc/ref/samp.html index 6ed07da..e61a3f8 100644 --- a/ds9/doc/ref/samp.html +++ b/ds9/doc/ref/samp.html @@ -2964,7 +2964,7 @@ -
[<plotname>] stats
+
[<plotname>] stats [yes|no]
    
[<plotname>] @@ -3033,7 +3033,7 @@ - list
+ list [yes|no]
     [<plotname>] @@ -4851,8 +4851,8 @@ plot save bar.dat # save current dataset
plot clear # clear all datasets
plot duplicate # duplicate current dataset
- plot stats
- plot list
+ plot stats yes
+ plot list yes
plot loadconfig foo.plt # load plot configuration
plot saveconfig bar.plt # save current plot configuration
diff --git a/ds9/doc/ref/xpa.html b/ds9/doc/ref/xpa.html index 8346501..fcb419a 100644 --- a/ds9/doc/ref/xpa.html +++ b/ds9/doc/ref/xpa.html @@ -2876,7 +2876,7 @@ -
[<plotname>] stats
+
[<plotname>] stats [yes|no]
    
[<plotname>] @@ -2946,7 +2946,7 @@ - list
+ list [yes|no]
     [<plotname>] @@ -4786,9 +4786,9 @@ $xpaset -p ds9 plot save bar.dat # save current dataset
$xpaset -p ds9 plot clear # clear all datasets
$xpaset -p ds9 plot duplicate # duplicate current dataset
-
$xpaset -p ds9 plot stats
+
$xpaset -p ds9 plot stats yes
$xpaset -p ds9 - plot list
+ plot list yes
$xpaset -p ds9 plot loadconfig foo.plt # load plot configuration
$xpaset -p ds9 plot saveconfig bar.plt # save current plot diff --git a/ds9/library/plotprocess.tcl b/ds9/library/plotprocess.tcl index 3f7f631..c62f767 100644 --- a/ds9/library/plotprocess.tcl +++ b/ds9/library/plotprocess.tcl @@ -851,6 +851,7 @@ proc ProcessPlotFont {varname xarname iname} { weight {incr i; set var(graph,title,weight) [lindex $xar $i]} slant {incr i; set var(graph,title,slant) [lindex $xar $i]} style { + # backward compatibility incr i switch [string tolower [lindex $xar $i]] { normal { @@ -879,6 +880,7 @@ proc ProcessPlotFont {varname xarname iname} { weight {incr i; set var(axis,title,weight) [lindex $xar $i]} slant {incr i; set var(axis,title,slant) [lindex $xar $i]} style { + # backward compatibility incr i switch [string tolower [lindex $xar $i]] { normal { @@ -907,6 +909,7 @@ proc ProcessPlotFont {varname xarname iname} { weight {incr i; set var(axis,font,weight) [lindex $xar $i]} slant {incr i; set var(axis,font,slant) [lindex $xar $i]} style { + # backward compatibility incr i switch [string tolower [lindex $xar $i]] { normal { @@ -933,6 +936,24 @@ proc ProcessPlotFont {varname xarname iname} { size {incr i; set var(legend,title,size) [lindex $xar $i]} weight {incr i; set var(legend,title,weight) [lindex $xar $i]} slant {incr i; set var(legend,title,slant) [lindex $xar $i]} + style { + # backward compatibility + incr i + switch [string tolower [lindex $xar $i]] { + normal { + set var(legend,title,weight) normal + set var(legend,title,slant) roman + } + bold { + set var(legend,title,weight) bold + set var(legend,title,slant) roman + } + italic { + set var(legend,title,weight) normal + set var(legend,title,slant) italic + } + } + } } } legend { @@ -943,6 +964,24 @@ proc ProcessPlotFont {varname xarname iname} { size {incr i; set var(legend,font,size) [lindex $xar $i]} weight {incr i; set var(legend,font,weight) [lindex $xar $i]} slant {incr i; set var(legend,font,slant) [lindex $xar $i]} + style { + # backward compatibility + incr i + switch [string tolower [lindex $xar $i]] { + normal { + set var(legend,font,weight) normal + set var(legend,font,slant) roman + } + bold { + set var(legend,font,weight) bold + set var(legend,font,slant) roman + } + italic { + set var(legend,font,weight) normal + set var(legend,font,slant) italic + } + } + } } } } @@ -1337,6 +1376,10 @@ proc ProcessSendPlotCmd {proc id param} { size {$proc $id "$var(graph,title,size)\n"} weight {$proc $id "$var(graph,title,weight)\n"} slant {$proc $id "$var(graph,title,slant)\n"} + style { + # backward compatibility + $proc $id "$var(graph,title,weight)\n" + } } } axestitle - @@ -1348,6 +1391,10 @@ proc ProcessSendPlotCmd {proc id param} { size {$proc $id "$var(axis,title,size)\n"} weight {$proc $id "$var(axis,title,weight)\n"} slant {$proc $id "$var(axis,title,slant)\n"} + style { + # backward compatibility + $proc $id "$var(axis,title,weight)\n" + } } } axesnumbers - @@ -1359,6 +1406,10 @@ proc ProcessSendPlotCmd {proc id param} { size {$proc $id "$var(axis,font,size)\n"} weight {$proc $id "$var(axis,font,weight)\n"} slant {$proc $id "$var(axis,font,slant)\n"} + style { + # backward compatibility + $proc $id "$var(axis,font,weight)\n" + } } } legendtitle { @@ -1369,6 +1420,10 @@ proc ProcessSendPlotCmd {proc id param} { size {$proc $id "$var(legend,title,size)\n"} weight {$proc $id "$var(legend,title,weight)\n"} slant {$proc $id "$var(legend,title,slant)\n"} + style { + # backward compatibility + $proc $id "$var(legend,title,weight)\n" + } } } legend { @@ -1379,6 +1434,10 @@ proc ProcessSendPlotCmd {proc id param} { size {$proc $id "$var(legend,font,size)\n"} weight {$proc $id "$var(legend,font,weight)\n"} slant {$proc $id "$var(legend,font,slant)\n"} + style { + # backward compatibility + $proc $id "$var(legend,font,weight)\n" + } } } } diff --git a/ds9/parsers/plotparser.tac b/ds9/parsers/plotparser.tac index 904c5a0..5b68cc6 100644 --- a/ds9/parsers/plotparser.tac +++ b/ds9/parsers/plotparser.tac @@ -213,6 +213,7 @@ plotCmd : DATA_ dim {PlotCmdData $2} | DUP_ duplicate | DUPLICATE_ duplicate | STATS_ yesno {PlotCmdSet stats $2 PlotStats} + # backward compatibility | STATISTICS_ yesno {PlotCmdSet stats $2 PlotStats} | LIST_ yesno {PlotCmdSet list $2 PlotList} | LOADCONFIG_ STRING_ {PlotCmdLoadConfig $2} -- cgit v0.12