# HG changeset patch # User jwe # Date 1197485075 0 # Node ID 28a9e3d3bf143c6510b3d4c5426f372f217323b6 # Parent e1e9bb54a4407dc519e6ed603aac963a196b832d [project @ 2007-12-12 18:44:35 by jwe] diff -r e1e9bb54a440 -r 28a9e3d3bf14 scripts/ChangeLog --- a/scripts/ChangeLog Wed Dec 12 16:47:07 2007 +0000 +++ b/scripts/ChangeLog Wed Dec 12 18:44:35 2007 +0000 @@ -1,3 +1,7 @@ +2007-12-12 John W. Eaton + + * plot/__go_draw_axes__.m: Handle the axes layer property. + 2007-12-12 David Bateman * plot/ellipsoid.m: Port from octave-forge, editing for style. diff -r e1e9bb54a440 -r 28a9e3d3bf14 scripts/plot/__go_draw_axes__.m --- a/scripts/plot/__go_draw_axes__.m Wed Dec 12 16:47:07 2007 +0000 +++ b/scripts/plot/__go_draw_axes__.m Wed Dec 12 18:44:35 2007 +0000 @@ -241,9 +241,13 @@ fputs (plot_stream, "set grid nomztics;\n"); endif - ## Unless we force the grid to the front, tics may appear below - ## plotted objects. - fputs (plot_stream, "set grid front;\n"); + ## The grid front/back/layerdefault option also controls the + ## 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"); + else + fputs (plot_stream, "set grid layerdefault;\n"); + endif if (! have_grid) fputs (plot_stream, "unset grid;\n"); endif diff -r e1e9bb54a440 -r 28a9e3d3bf14 src/ChangeLog --- a/src/ChangeLog Wed Dec 12 16:47:07 2007 +0000 +++ b/src/ChangeLog Wed Dec 12 18:44:35 2007 +0000 @@ -1,5 +1,8 @@ 2007-12-12 John W. Eaton + * graphics.h.in (class axes) Add the layer property. + * graphics.cc (class axes) Ditto. + * graphics.cc (gh_manager::get_handle): Use ceil instead of trunc. 2007-12-11 John W. Eaton diff -r e1e9bb54a440 -r 28a9e3d3bf14 src/graphics.cc --- a/src/graphics.cc Wed Dec 12 16:47:07 2007 +0000 +++ b/src/graphics.cc Wed Dec 12 18:44:35 2007 +0000 @@ -1098,6 +1098,7 @@ colororder (default_colororder ()), dataaspectratio (Matrix (1, 3, 1.0)), dataaspectratiomode ("auto"), + layer (radio_values ("{bottom}|top")), xlim (), ylim (), zlim (), @@ -1263,6 +1264,8 @@ set_dataaspectratio (val); else if (name.compare ("dataaspectratiomode")) set_dataaspectratiomode (val); + else if (name.compare ("layer")) + set_layer (val); else if (name.compare ("xlim")) set_xlim (val); else if (name.compare ("ylim")) @@ -1380,6 +1383,7 @@ colororder = default_colororder (); dataaspectratio = Matrix (1, 3, 1.0); dataaspectratiomode = "auto"; + layer = radio_property (radio_values ("{bottom}|top")); Matrix tlim (1, 2, 0.0); tlim(1) = 1; @@ -1512,6 +1516,7 @@ m.assign ("colororder", colororder); m.assign ("dataaspectratio", dataaspectratio); m.assign ("dataaspectratiomode", dataaspectratiomode); + m.assign ("layer", layer); m.assign ("xlim", xlim); m.assign ("ylim", ylim); m.assign ("zlim", zlim); @@ -1596,6 +1601,8 @@ retval = dataaspectratio; else if (name.compare ("dataaspectratiomode")) retval = dataaspectratiomode; + else if (name.compare ("layer")) + retval = layer; else if (name.compare ("xlim")) retval = xlim; else if (name.compare ("ylim")) @@ -1736,6 +1743,7 @@ m["colororder"] = default_colororder (); m["dataaspectratio"] = Matrix (1, 3, 1.0); m["dataaspectratiomode"] = "auto"; + m["layer"] = radio_property (radio_values ("{bottom}|top")); Matrix tlim (1, 2, 0.0); tlim(1) = 1; diff -r e1e9bb54a440 -r 28a9e3d3bf14 src/graphics.h.in --- a/src/graphics.h.in Wed Dec 12 16:47:07 2007 +0000 +++ b/src/graphics.h.in Wed Dec 12 18:44:35 2007 +0000 @@ -1360,6 +1360,7 @@ octave_value colororder octave_value dataaspectratio m octave_value dataaspectratiomode + radio_property layer a octave_value xlim m octave_value ylim m octave_value zlim m