changeset 7274:44fdc33e5207

[project @ 2007-12-10 07:36:50 by jwe]
author jwe
date Mon, 10 Dec 2007 07:36:50 +0000
parents 7e58655dbe23
children c099705f1aa7
files scripts/ChangeLog scripts/plot/__go_draw_axes__.m
diffstat 2 files changed, 22 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Mon Dec 10 07:33:20 2007 +0000
+++ b/scripts/ChangeLog	Mon Dec 10 07:36:50 2007 +0000
@@ -1,10 +1,16 @@
+2007-12-10  John W. Eaton  <jwe@octave.org>
+
+	* plot/__go_draw_axes__.m: If we have a grid, send "set grid
+	front" to gnuplot.
+
 2007-12-10  David Bateman  <dbateman@free.fr>
 
-	* __go_draw_axes__.m: Issue "set view map" for pcolor, and "set
+	* plot/__go_draw_axes__.m: Issue "set view map" for pcolor, and "set
 	border front" from images.
-	* __go_draw_figure__.m: Issue "set autoscale fix" for gnuplot.
-	* pcolor.m: Set axis "box" property.
-	* title.m, xlabel.m, ylabel.m, xlabel.m: Mark as commands.
+	* plot/__go_draw_figure__.m: Issue "set autoscale fix" for gnuplot.
+	* plot/pcolor.m: Set axis "box" property.
+	* plot/title.m, plot/xlabel.m, plot/ylabel.m, plot/xlabel.m:
+	Mark as commands.
 
 2007-12-07  David Bateman  <dbateman@free.fr>
 
--- a/scripts/plot/__go_draw_axes__.m	Mon Dec 10 07:33:20 2007 +0000
+++ b/scripts/plot/__go_draw_axes__.m	Mon Dec 10 07:36:50 2007 +0000
@@ -194,25 +194,31 @@
       yaxisloc_using = "y1";
     endif
 
+    have_grid = false;
+
     if (strcmpi (axis_obj.xgrid, "on"))
+      have_grid = true;
       fprintf (plot_stream, "set grid %stics;\n", xaxisloc);
     else
       fprintf (plot_stream, "set grid no%stics;\n", xaxisloc);
     endif
 
     if (strcmpi (axis_obj.ygrid, "on"))
+      have_grid = true;
       fprintf (plot_stream, "set grid %stics;\n", yaxisloc);
     else
       fprintf (plot_stream, "set grid no%stics;\n", yaxisloc);
     endif
 
     if (strcmpi (axis_obj.zgrid, "on"))
+      have_grid = true;
       fputs (plot_stream, "set grid ztics;\n");
     else
       fputs (plot_stream, "set grid noztics;\n");
     endif
 
     if (strcmpi (axis_obj.xminorgrid, "on"))
+      have_grid = true;
       fprintf (plot_stream, "set m%stics 5;\n", xaxisloc);
       fprintf (plot_stream, "set grid m%stics;\n", xaxisloc);
     else
@@ -220,6 +226,7 @@
     endif
 
     if (strcmpi (axis_obj.yminorgrid, "on"))
+      have_grid = true;
       fprintf (plot_stream, "set m%stics 5;\n", yaxisloc);
       fprintf (plot_stream, "set grid m%stics;\n", yaxisloc);
     else
@@ -227,12 +234,17 @@
     endif
 
     if (strcmpi (axis_obj.zminorgrid, "on"))
+      have_grid = true;
       fputs (plot_stream, "set mztics 5;\n");
       fputs (plot_stream, "set grid mztics;\n");
     else
       fputs (plot_stream, "set grid nomztics;\n");
     endif
 
+    if (have_grid)
+      fputs (plot_stream, "set grid front;\n");
+    endif
+
     do_tics (axis_obj, plot_stream, ymirror, mono);
 
     xlogscale = strcmpi (axis_obj.xscale, "log");