diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-03-29 21:32:54 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-03-29 21:32:54 (GMT) |
commit | c3419fd29a2894195925560d2c37915dd555a6d6 (patch) | |
tree | d8f5cc7edca60fc84ec1bfa08c6a08fd3892177b /ds9/library | |
parent | 4cc2d933414b448948fb17bf480b281163759016 (diff) | |
download | blt-c3419fd29a2894195925560d2c37915dd555a6d6.zip blt-c3419fd29a2894195925560d2c37915dd555a6d6.tar.gz blt-c3419fd29a2894195925560d2c37915dd555a6d6.tar.bz2 |
add ds9 plot parser
Diffstat (limited to 'ds9/library')
-rw-r--r-- | ds9/library/cat.tcl | 28 | ||||
-rw-r--r-- | ds9/library/colorbar.tcl | 35 | ||||
-rw-r--r-- | ds9/library/plotprocess.tcl | 70 |
3 files changed, 132 insertions, 1 deletions
diff --git a/ds9/library/cat.tcl b/ds9/library/cat.tcl index 36acb35..90b2c3a 100644 --- a/ds9/library/cat.tcl +++ b/ds9/library/cat.tcl @@ -2069,6 +2069,34 @@ proc CatalogCmdSymbol {col value} { CATGenerate $cvarname } +proc CatalogCmdSymbolStyle {value} { + global cvarname + upvar #0 $cvarname cvar + global $cvar(symdb) + + switch $value { + normal { + starbase_set $cvar(symdb) $cvar(row) \ + [starbase_colnum $cvar(symdb) fontweight] normal + starbase_set $cvar(symdb) $cvar(row) \ + [starbase_colnum $cvar(symdb) fontslant] roman + } + bold { + starbase_set $cvar(symdb) $cvar(row) \ + [starbase_colnum $cvar(symdb) fontweight] bold + starbase_set $cvar(symdb) $cvar(row) \ + [starbase_colnum $cvar(symdb) fontslant] roman + } + italic { + starbase_set $cvar(symdb) $cvar(row) \ + [starbase_colnum $cvar(symdb) fontweight] normal + starbase_set $cvar(symdb) $cvar(row) \ + [starbase_colnum $cvar(symdb) fontslant] italic + } + } + CATGenerate $cvarname +} + proc CatalogCmdSymbolAdd {} { global cvarname upvar #0 $cvarname cvar diff --git a/ds9/library/colorbar.tcl b/ds9/library/colorbar.tcl index 94a5065..56bf164 100644 --- a/ds9/library/colorbar.tcl +++ b/ds9/library/colorbar.tcl @@ -1486,6 +1486,41 @@ proc ProcessColorbarCmd {varname iname} { } } +proc ColorbarCmdView {which value} { + global colorbar + + set colorbar($which) $value + UpdateView +} + +proc ColorbarCmdFontStyle {value} { + global cvarname + upvar #0 $cvarname cvar + global $cvar(symdb) + + switch $value { + normal { + starbase_set $cvar(symdb) $cvar(row) \ + [starbase_colnum $cvar(symdb) fontweigth] normal + starbase_set $cvar(symdb) $cvar(row) \ + [starbase_colnum $cvar(symdb) fontslant] roman + } + bold { + starbase_set $cvar(symdb) $cvar(row) \ + [starbase_colnum $cvar(symdb) fontweight] bold + starbase_set $cvar(symdb) $cvar(row) \ + [starbase_colnum $cvar(symdb) fontslant] roman + } + italic { + starbase_set $cvar(symdb) $cvar(row) \ + [starbase_colnum $cvar(symdb) weight] normal + starbase_set $cvar(symdb) $cvar(row) \ + [starbase_colnum $cvar(symdb) slant] italic + } + } + CATGenerate $cvarname +} + proc ProcessSendColorbarCmd {proc id param} { global colorbar global view diff --git a/ds9/library/plotprocess.tcl b/ds9/library/plotprocess.tcl index bfe02a6..de2a6b1 100644 --- a/ds9/library/plotprocess.tcl +++ b/ds9/library/plotprocess.tcl @@ -524,8 +524,8 @@ proc ProcessPlotNewOne {which varname xarname iname buf} { } proc ProcessPlotData {varname xarname iname buf} { - upvar #0 $varname var global $varname + upvar #0 $varname var upvar 2 $xarname xar upvar 2 $iname i @@ -537,6 +537,74 @@ proc ProcessPlotData {varname xarname iname buf} { PlotList $varname } +proc PlotCmdLoad {fn dim} { + global cvarname + + if {$fn != {}} { + PlotLoadDataFile $cvarname $fn $dim + FileLast apdatafbox $fn + } +} + +proc PlotCmdSave {fn} { + global cvarname + + if {$fn != {}} { + PlotSaveDataFile $varname $fn + FileLast apdatafbox $fn + } +} + +proc PlotCmdStats {value} { + global cvarname + upvar #0 $cvarname cvar + + set cvar(stats) $value + PlotStats $cvarname +} + +proc PlotCmdList {value} { + global cvarname + upvar #0 $cvarname cvar + + set cvar(list) $value + PlotList $cvarname +} + +proc PlotCmdLoadConfig {fn} { + global cvarname + + if {$fn != {}} { + PlotLoadConfigFile $cvarname $fn + FileLast apconfigfbox $fn + } +} + +proc PlotCmdSaveConfig {fn} { + global cvarname + + if {$fn != {}} { + PlotSaveConfigFile $cvarname $fn + FileLast apconfigfbox $fn + } +} + +proc PlotCmdMode {value} { + global cvarname + upvar #0 $cvarname cvar + + set cvar(mode) $value + PlotChangMode $cvarname +} + +proc PlotCmdPlot {which value} { + global cvarname + upvar #0 $cvarname cvar + + set cvar($which) $value + $cvar(proc,updategraph) $cvarname +} + # File Menu proc ProcessPlotPrint {varname xarname iname} { upvar #0 $varname var |