changeset 9438:bac81ac76a57

__go_draw_axes__.m: also use layer property for plot border
author John W. Eaton <jwe@octave.org>
date Fri, 17 Jul 2009 15:40:23 -0400
parents db08c2376970
children 0a696f8aa434
files scripts/ChangeLog scripts/plot/__go_draw_axes__.m
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Thu Jul 16 14:06:29 2009 -0400
+++ b/scripts/ChangeLog	Fri Jul 17 15:40:23 2009 -0400
@@ -1,3 +1,9 @@
+2009-07-17  John W. Eaton  <jwe@octave.org>
+
+	* plot/__go_draw_axes__.m: Use "layer" property to decide whether
+	to send "set border front" or "set border layerdefault" to plot
+	stream.  Don't send "set border front" to plot stream for image data.
+
 2009-07-15  Robert T. Short <octave@phaselockedsystems.com>
 
 	* polynomial/conv.m: Fix Matlab incompatibility.  New tests.
--- a/scripts/plot/__go_draw_axes__.m	Thu Jul 16 14:06:29 2009 -0400
+++ b/scripts/plot/__go_draw_axes__.m	Fri Jul 17 15:40:23 2009 -0400
@@ -267,8 +267,13 @@
     ## appearance of tics, so it is used even if the grid is absent.
     if (strcmpi (axis_obj.layer, "top"))
       fputs (plot_stream, "set grid front;\n");
+      fputs (plot_stream, "set border front;\n");
     else
       fputs (plot_stream, "set grid layerdefault;\n");
+      ## FIXME -- the gnuplot help says that "layerdefault" should work
+      ## for set border too, but it fails for me with gnuplot 4.2.5.  So
+      ## use "back" instead.
+      fputs (plot_stream, "set border back;\n");
     endif
     if (! have_grid)
       fputs (plot_stream, "unset grid;\n");
@@ -369,7 +374,6 @@
 	    elseif (strcmpi (obj.cdatamapping, "direct"))
 	      cdatadirect = true;
 	    endif
-	    fputs (plot_stream, "set border front;\n");
 	    data_idx++;
 	    is_image_data(data_idx) = true;
 	    parametric(data_idx) = false;