summaryrefslogtreecommitdiffstats
path: root/ds9/library/plotprocess.tcl
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2019-03-06 21:56:50 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2019-03-06 21:56:50 (GMT)
commit642ee5e90cff7d1ddee27eac4668fb31863e93e7 (patch)
treeb2703442adbc2fadc0eb2d29b2a206bdb93124e7 /ds9/library/plotprocess.tcl
parent6a55433ce6d2c1ab8ead1374dca25dd8430dd977 (diff)
downloadblt-642ee5e90cff7d1ddee27eac4668fb31863e93e7.zip
blt-642ee5e90cff7d1ddee27eac4668fb31863e93e7.tar.gz
blt-642ee5e90cff7d1ddee27eac4668fb31863e93e7.tar.bz2
PLOT: add plot export to gif,png,tiff,jpeg.
Diffstat (limited to 'ds9/library/plotprocess.tcl')
-rw-r--r--ds9/library/plotprocess.tcl17
1 files changed, 17 insertions, 0 deletions
diff --git a/ds9/library/plotprocess.tcl b/ds9/library/plotprocess.tcl
index d4bef17..f21ccc3 100644
--- a/ds9/library/plotprocess.tcl
+++ b/ds9/library/plotprocess.tcl
@@ -294,6 +294,23 @@ proc PlotCmdFontStyle {which value} {
$cvar(proc,updategraph) $cvarname
}
+proc PlotCmdExport {format fn} {
+ global cvarname
+ upvar #0 $cvarname cvar
+
+ switch -- $format {
+ gif {FileLast giffbox $fn}
+ jpeg {FileLast jpegfbox $fn}
+ tiff {FileLast tifffbox $fn}
+ png {FileLast pngfbox $fn}
+ default {
+ Error "[msgcat::mc {Not valid export format}] $format"
+ return
+ }
+ }
+ PlotExport $cvarname $fn $format
+}
+
proc ProcessSendPlotCmd {proc id param {sock {}} {fn {}}} {
global iap
global parse