changeset 22602:883b72cdf0b2 stable

Use old syntax to fix GPVAL_TERM conditionals under gnuplot 4.4.0 (bug #49223). * __gnuplot_draw_axes__.m: Place all 'unset obj 1' gnuplot commands after a GPVAL_TERM conditional test to avoid extraneous gnuplot warning messages. * __gnuplot_draw_figure__.m: Drop newer conditional syntax "{ }" in favor of old gnuplot syntax. Remove an extraneous 'unset' command that would simply cause a gnuplot warning message.
author Daniel J Sebald <daniel.sebald@ieee.org>
date Thu, 06 Oct 2016 01:08:22 -0500
parents dd80fb1ef949
children 610f88ed2b78
files scripts/plot/util/private/__gnuplot_draw_axes__.m scripts/plot/util/private/__gnuplot_draw_figure__.m
diffstat 2 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/private/__gnuplot_draw_axes__.m	Thu Oct 06 12:10:22 2016 -0400
+++ b/scripts/plot/util/private/__gnuplot_draw_axes__.m	Thu Oct 06 01:08:22 2016 -0500
@@ -1659,7 +1659,7 @@
         if (! is_image_data (i-1))
           fputs (plot_stream, "; ");
           if (bg_is_set)
-            fputs (plot_stream, "unset obj 1; \\\n");
+            fputs (plot_stream, "if (GPVAL_TERM eq \"qt\") unset obj 1;\n");
             bg_is_set = false;
           endif
           if (fg_is_set)
@@ -1682,7 +1682,7 @@
         endif
       elseif (is_image_data (i-1))
         if (bg_is_set)
-          fputs (plot_stream, "unset obj 1; \\\n");
+          fputs (plot_stream, "if (GPVAL_TERM eq \"qt\") unset obj 1;\n");
           bg_is_set = false;
         endif
         if (fg_is_set)
@@ -1730,7 +1730,7 @@
   endif
 
   if (bg_is_set)
-    fputs (plot_stream, "unset obj 1;\n");
+    fputs (plot_stream, "if (GPVAL_TERM eq \"qt\") unset obj 1;\n");
     bg_is_set = false;
   endif
 
--- a/scripts/plot/util/private/__gnuplot_draw_figure__.m	Thu Oct 06 12:10:22 2016 -0400
+++ b/scripts/plot/util/private/__gnuplot_draw_figure__.m	Thu Oct 06 01:08:22 2016 -0500
@@ -38,11 +38,10 @@
       fputs (plot_stream, "set size 1, 1\n");
       bg = get (h, "color");
       if (isnumeric (bg))
-        fprintf (plot_stream, "if (GPVAL_TERM eq \"qt\") {set obj 1 rectangle from screen 0,0 to screen 1,1 behind fc rgb \"#%02x%02x%02x\" fs solid noborder}\n", round (255 * bg));
+        fprintf (plot_stream, "if (GPVAL_TERM eq \"qt\") set obj 1 rectangle from screen 0,0 to screen 1,1 behind fc rgb \"#%02x%02x%02x\" fs solid noborder;\n", round (255 * bg));
         bg_is_set = true;
       else
         bg_is_set = false;
-        fprintf (plot_stream, "unset obj 1");
       endif
       fg_was_set = false;