# HG changeset patch # User jwe # Date 1181944459 0 # Node ID b8d188455f2f615f5ab795769ce8ca3efe8c50a7 # Parent 7888712d353209f44b45bf370b978e9801d9b037 [project @ 2007-06-15 21:54:18 by jwe] diff -r 7888712d3532 -r b8d188455f2f scripts/ChangeLog --- a/scripts/ChangeLog Fri Jun 15 21:45:50 2007 +0000 +++ b/scripts/ChangeLog Fri Jun 15 21:54:19 2007 +0000 @@ -1,3 +1,8 @@ +2007-06-15 John W. Eaton + + * plot/__go_draw_axes__.m: Only attempt label rotation if + have_newer_gnuplot is true. + 2007-06-15 Pete Gustafson * plot/__go_draw_axes__.m Handle rotation arg for axis labels. diff -r 7888712d3532 -r b8d188455f2f scripts/plot/__go_draw_axes__.m --- a/scripts/plot/__go_draw_axes__.m Fri Jun 15 21:45:50 2007 +0000 +++ b/scripts/plot/__go_draw_axes__.m Fri Jun 15 21:54:19 2007 +0000 @@ -72,9 +72,14 @@ if (isempty (t.string)) fputs (plot_stream, "unset xlabel;\n"); else - ## 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) + fprintf (plot_stream, "set xlabel \"%s\"", + undo_string_escapes (t.string)); + if (have_newer_gnuplot) + ## Rotation of xlabel not yet support by gnuplot as of 4.2, but + ## there is no message about it. + fprintf (plot_stream, " rotate by %f", angle); + endif + fputs (plot_stream, ";\n"); endif endif @@ -84,8 +89,12 @@ if (isempty (t.string)) fputs (plot_stream, "unset ylabel;\n"); else - fprintf (plot_stream, "set ylabel \"%s\" rotate by %f;\n", - undo_string_escapes (t.string), angle) + fprintf (plot_stream, "set ylabel \"%s\"", + undo_string_escapes (t.string)); + if (have_newer_gnuplot) + fprintf (" rotate by %f;\n", angle); + endif + fputs (plot_stream, ";\n"); endif endif @@ -95,9 +104,14 @@ if (isempty (t.string)) fputs (plot_stream, "unset zlabel;\n"); else - ## 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) + fprintf (plot_stream, "set zlabel \"%s\"", + undo_string_escapes (t.string)); + if (have_newer_gnuplot) + ## Rotation of zlabel not yet support by gnuplot as of 4.2, but + ## there is no message about it. + fprintf (plot_stream, " rotate by %f;\n", angle); + endif + fputs (plot_stream, ";\n"); endif endif