Mercurial > hg > octave-avbm
changeset 7271:c18512d0ddb6
[project @ 2007-12-10 06:52:51 by jwe]
author | jwe |
---|---|
date | Mon, 10 Dec 2007 06:52:51 +0000 |
parents | 20b3ac39ee40 |
children | 05ee52d7fad6 |
files | scripts/ChangeLog scripts/plot/__go_draw_axes__.m scripts/plot/__go_draw_figure__.m scripts/plot/pcolor.m scripts/plot/title.m scripts/plot/xlabel.m scripts/plot/ylabel.m scripts/plot/zlabel.m |
diffstat | 8 files changed, 31 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,11 @@ +2007-12-10 David Bateman <dbateman@free.fr> + + * __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. + 2007-12-07 David Bateman <dbateman@free.fr> * plot/surf.m: Don't set facecolor property.
--- a/scripts/plot/__go_draw_axes__.m +++ b/scripts/plot/__go_draw_axes__.m @@ -268,6 +268,7 @@ data = cell (); is_image_data = []; hidden_removal = NaN; + view_map = false; xlim = axis_obj.xlim; ylim = axis_obj.ylim; @@ -305,6 +306,7 @@ if (use_gnuplot_for_images) + fputs (plot_stream, "set border front;\n"); data_idx++; is_image_data(data_idx) = true; parametric(data_idx) = false; @@ -789,6 +791,7 @@ case "surface" nd = 3; + view_map = true; if (! (strncmp (obj.edgecolor, "none", 4) && strncmp (obj.facecolor, "none", 4))) data_idx++; @@ -1170,7 +1173,11 @@ rot_z += 360; endwhile fputs (plot_stream, "set ticslevel 0;\n"); - fprintf (plot_stream, "set view %.15g, %.15g;\n", rot_x, rot_z); + if (view_map && rot_x == 0 && rot_z == 0) + fputs (plot_stream, "set view map;\n"); + else + fprintf (plot_stream, "set view %.15g, %.15g;\n", rot_x, rot_z); + endif endif fprintf (plot_stream, "%s \"-\" %s %s %s \\\n", plot_cmd, usingclause{1}, titlespec{1}, withclause{1}); @@ -1191,6 +1198,11 @@ fputs (plot_stream, "plot \"-\";\nInf Inf\ne\n"); endif + ## Needed to allow mouse rotation with pcolor + if (view_map) + fputs (plot_stream, "unset view;\n"); + endif + fflush (plot_stream); else
--- a/scripts/plot/__go_draw_figure__.m +++ b/scripts/plot/__go_draw_figure__.m @@ -45,6 +45,7 @@ endfor fputs (plot_stream, "\nreset;\n"); + fputs (plot_stream, "set autoscale fix;\n"); multiplot_mode = axes_count > 1;
--- a/scripts/plot/pcolor.m +++ b/scripts/plot/pcolor.m @@ -50,6 +50,7 @@ ax = get (tmp, "parent"); set (tmp, "facecolor", "flat"); + set (ax, "box", "on"); if (! ishold ()) set (ax, "view", [0, 90]);
--- a/scripts/plot/title.m +++ b/scripts/plot/title.m @@ -22,6 +22,8 @@ ## Create a title object and return a handle to it. ## @end deftypefn +## PKG_ADD: mark_as_command title + ## Author: jwe function h = title (varargin)
--- a/scripts/plot/xlabel.m +++ b/scripts/plot/xlabel.m @@ -28,6 +28,8 @@ ## bar, stairs, ylabel, title} ## @end deftypefn +## PKG_ADD: mark_as_command xlabel + ## Author: jwe function retval = xlabel (varargin)