Mercurial > hg > octave-lojdl
changeset 6737:7888712d3532
[project @ 2007-06-15 21:45:50 by jwe]
author | jwe |
---|---|
date | Fri, 15 Jun 2007 21:45:50 +0000 |
parents | 751f340d486c |
children | b8d188455f2f |
files | scripts/ChangeLog scripts/plot/__axis_label__.m scripts/plot/__go_draw_axes__.m |
diffstat | 3 files changed, 23 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,5 +1,9 @@ 2007-06-15 Pete Gustafson <petegus@umich.edu> + * plot/__go_draw_axes__.m Handle rotation arg for axis labels. + * plot/__axis_label__.m Assign ylabel default rotation property + to 90, all others 0. + * plot/__errplot__.m: Set ifmt from fmt.linestyle. * plot/__go_draw_axes__.m: Removed undefined tx from call to get_data_limits.
--- a/scripts/plot/__axis_label__.m +++ b/scripts/plot/__axis_label__.m @@ -29,7 +29,14 @@ if (ischar (txt)) ## FIXME -- should be able to use text instead of __go_text__. ca = gca (); - h = __go_text__ (ca, "string", txt, varargin{:}); + + if (strcmp (caller, "ylabel")) + rot = 90; + else + rot = 0; + endif + + h = __go_text__ (ca, "string", txt, "rotation", rot, varargin{:}); set (ca, caller, h); if (nargout > 0) retval = h;
--- a/scripts/plot/__go_draw_axes__.m +++ b/scripts/plot/__go_draw_axes__.m @@ -68,31 +68,36 @@ if (! isempty (axis_obj.xlabel)) t = get (axis_obj.xlabel); + angle = t.rotation; if (isempty (t.string)) fputs (plot_stream, "unset xlabel;\n"); else - fprintf (plot_stream, "set xlabel \"%s\";\n", - undo_string_escapes (t.string)); + ## Rotation of xlabel not yet support by gnuplot as of 4.2. + fprintf (plot_stream, "set xlabel \"%s\" rotate by %f;\n", + undo_string_escapes (t.string), angle) endif endif if (! isempty (axis_obj.ylabel)) t = get (axis_obj.ylabel); + angle = t.rotation; if (isempty (t.string)) fputs (plot_stream, "unset ylabel;\n"); else - fprintf (plot_stream, "set ylabel \"%s\";\n", - undo_string_escapes (t.string)); + fprintf (plot_stream, "set ylabel \"%s\" rotate by %f;\n", + undo_string_escapes (t.string), angle) endif endif if (! isempty (axis_obj.zlabel)) t = get (axis_obj.zlabel); + angle = t.rotation; if (isempty (t.string)) fputs (plot_stream, "unset zlabel;\n"); else - fprintf (plot_stream, "set zlabel \"%s\";\n", - undo_string_escapes (t.string)); + ## Rotation of zlabel not yet support by gnuplot as of 4.2. + fprintf (plot_stream, "set zlabel \"%s\" rotate by %f;\n", + undo_string_escapes (t.string), angle) endif endif