Mercurial > hg > octave-lyh
changeset 7307:28a9e3d3bf14
[project @ 2007-12-12 18:44:35 by jwe]
author | jwe |
---|---|
date | Wed, 12 Dec 2007 18:44:35 +0000 |
parents | e1e9bb54a440 |
children | d8209a80e093 |
files | scripts/ChangeLog scripts/plot/__go_draw_axes__.m src/ChangeLog src/graphics.cc src/graphics.h.in |
diffstat | 5 files changed, 23 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2007-12-12 John W. Eaton <jwe@octave.org> + + * plot/__go_draw_axes__.m: Handle the axes layer property. + 2007-12-12 David Bateman <dbateman@free.fr> * plot/ellipsoid.m: Port from octave-forge, editing for style.
--- a/scripts/plot/__go_draw_axes__.m +++ b/scripts/plot/__go_draw_axes__.m @@ -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
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2007-12-12 John W. Eaton <jwe@octave.org> + * 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 <jwe@octave.org>
--- a/src/graphics.cc +++ b/src/graphics.cc @@ -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;