diff scripts/plot/__go_draw_axes__.m @ 10528:6a2e4e464d38

Unset figure color in __go_draw_axes__ (partial fix for bug #29060)
author David Bateman <dbateman@free.fr>
date Fri, 16 Apr 2010 17:36:28 +0200
parents 348b26872fc8
children 568c7c041fac
line wrap: on
line diff
--- a/scripts/plot/__go_draw_axes__.m
+++ b/scripts/plot/__go_draw_axes__.m
@@ -23,9 +23,9 @@
 
 ## Author: jwe
 
-function __go_draw_axes__ (h, plot_stream, enhanced, mono, implicit_margin)
+function __go_draw_axes__ (h, plot_stream, enhanced, mono, implicit_margin, bg_is_set)
 
-  if (nargin >= 4 && nargin <= 5)
+  if (nargin >= 4 && nargin <= 6)
 
     showhiddenhandles = get (0, "showhiddenhandles");
     unwind_protect
@@ -1551,10 +1551,18 @@
 	elseif (is_image_data (i))
 	  if (! is_image_data (i-1))
 	    fputs (plot_stream, "; ");
+            if (bg_is_set)      
+              fputs (plot_stream, "unset obj 1; \\\n");
+              bg_is_set = false;
+            endif
 	  endif
           fprintf (plot_stream, "%s \"-\" %s %s %s \\\n", plot_cmd,
 		   usingclause{i}, titlespec{i}, withclause{i});
 	elseif (is_image_data (i-1))
+          if (bg_is_set)      
+            fputs (plot_stream, "unset obj 1; \\\n");
+              bg_is_set = false;
+            endif
 	  fprintf (plot_stream, "%s \"-\" binary format='%%float64' %s %s %s \\\n", plot_cmd,
 		   usingclause{i}, titlespec{i}, withclause{i});
 	else
@@ -1593,6 +1601,11 @@
     if (view_map)
       fputs (plot_stream, "unset view;\n");
     endif
+    
+    if (bg_is_set)      
+      fputs (plot_stream, "unset obj 1;\n");
+      bg_is_set = false;
+    endif
 
     fflush (plot_stream);