changeset 16898:497c1263378a gnuout

move the plot-done message to stdout and make it optional * __go_draw_figure__.m: only if PLOTDONEMESSAGE is in env, print the contents of that variable when plot is done
author Shane Carr <shane.carr@wustl.edu>
date Wed, 03 Jul 2013 10:00:07 -0500
parents 0a63acf8a192
children ea87cfa8ea32
files scripts/plot/private/__go_draw_figure__.m
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/private/__go_draw_figure__.m
+++ b/scripts/plot/private/__go_draw_figure__.m
@@ -194,8 +194,11 @@
         else
           fputs (plot_stream, "\nunset multiplot; unset output;\n");
           # `unset output` is required to flush out the svg file format
-          # also send a signal to STDERR that the plot is complete:
-          fputs (stderr(), "PLOT-DONE");
+          # look for the PLOTDONEMESSAGE environment variable.
+          # if present, print that message to STDOUT right now.
+          if (! isempty(getenv ("PLOTDONEMESSAGE")))
+            fputs (stdout(), getenv ("PLOTDONEMESSAGE"));
+          endif
         endif
       else
         fputs (plot_stream, "\nreset; clear;\n");