Mercurial > hg > octave-lyh
changeset 11615:4036b9a74886 release-3-0-x
[3-0-0-branch @ 2008-01-16 19:27:14 by jwe]
author | jwe |
---|---|
date | Wed, 16 Jan 2008 19:27:15 +0000 |
parents | 26b667edc07a |
children | ad944c3cc888 |
files | scripts/ChangeLog scripts/plot/__go_draw_axes__.m |
diffstat | 2 files changed, 40 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2008-01-16 John W. Eaton <jwe@octave.org> + + * plot/__go_draw_axes__.m (__do_enhanced_option__): New subfunction. + Use it to disable enhanced mode for individual labels and titles. + 2008-01-14 John W. Eaton <jwe@octave.org> * plot/__go_draw_axes__.m (get_fontname_and_size): Use strcmpi
--- a/scripts/plot/__go_draw_axes__.m +++ b/scripts/plot/__go_draw_axes__.m @@ -79,8 +79,9 @@ else fontspec = sprintf ("font \"%s,%d\"", f, s); endif - fprintf (plot_stream, "set title \"%s\" %s;\n", - undo_string_escapes (tt), fontspec); + fprintf (plot_stream, "set title \"%s\" %s %s;\n", + undo_string_escapes (tt), fontspec, + __do_enhanced_option__ (enhanced, t)); endif endif @@ -100,11 +101,13 @@ fontspec = sprintf ("font \"%s,%d\"", f, s); endif if (strcmpi (axis_obj.xaxislocation, "top")) - fprintf (plot_stream, "set x2label \"%s\" %s %s", - undo_string_escapes (tt), colorspec, fontspec); + fprintf (plot_stream, "set x2label \"%s\" %s %s %s", + undo_string_escapes (tt), colorspec, fontspec, + __do_enhanced_option__ (enhanced, t)); else - fprintf (plot_stream, "set xlabel \"%s\" %s %s", - undo_string_escapes (tt), colorspec, fontspec); + fprintf (plot_stream, "set xlabel \"%s\" %s %s %s", + undo_string_escapes (tt), colorspec, fontspec, + __do_enhanced_option__ (enhanced, t)); endif if (have_newer_gnuplot) ## Rotation of xlabel not yet support by gnuplot as of 4.2, but @@ -136,11 +139,13 @@ fontspec = sprintf ("font \"%s,%d\"", f, s); endif if (strcmpi (axis_obj.yaxislocation, "right")) - fprintf (plot_stream, "set y2label \"%s\" %s %s", - undo_string_escapes (tt), colorspec, fontspec); + fprintf (plot_stream, "set y2label \"%s\" %s %s %s", + undo_string_escapes (tt), colorspec, fontspec, + __do_enhanced_option__ (enhanced, t)); else - fprintf (plot_stream, "set ylabel \"%s\" %s %s", - undo_string_escapes (tt), colorspec, fontspec); + fprintf (plot_stream, "set ylabel \"%s\" %s %s %s", + undo_string_escapes (tt), colorspec, fontspec, + __do_enhanced_option__ (enhanced, t)); endif if (have_newer_gnuplot) fprintf (plot_stream, " rotate by %f;\n", angle); @@ -168,8 +173,9 @@ else fontspec = sprintf ("font \"%s,%d\"", f, s); endif - fprintf (plot_stream, "set zlabel \"%s\" %s %s", - undo_string_escapes (tt), colorspec, fontspec); + fprintf (plot_stream, "set zlabel \"%s\" %s %s %s", + undo_string_escapes (tt), colorspec, fontspec, + __do_enhanced_option__ (enhanced, t)); if (have_newer_gnuplot) ## Rotation of zlabel not yet support by gnuplot as of 4.2, but ## there is no message about it. @@ -984,14 +990,16 @@ if (nd == 3) fprintf (plot_stream, - "set label \"%s\" at %s %.15g,%.15g,%.15g %s rotate by %f %s front %s;\n", + "set label \"%s\" at %s %.15g,%.15g,%.15g %s rotate by %f %s %s front %s;\n", undo_string_escapes (label), units, lpos(1), - lpos(2), lpos(3), halign, angle, fontspec, colorspec); + lpos(2), lpos(3), halign, angle, fontspec, + __do_enhanced_option__ (enhanced, obj), colorspec); else fprintf (plot_stream, - "set label \"%s\" at %s %.15g,%.15g %s rotate by %f %s front %s;\n", + "set label \"%s\" at %s %.15g,%.15g %s rotate by %f %s %s front %s;\n", undo_string_escapes (label), units, - lpos(1), lpos(2), halign, angle, fontspec, colorspec); + lpos(1), lpos(2), halign, angle, fontspec, + __do_enhanced_option__ (enhanced, obj), colorspec); endif otherwise @@ -2023,3 +2031,14 @@ endif endfunction + +function retval = __do_enhanced_option__ (enhanced, obj) + retval = ""; + if (enhanced) + if (strcmpi (obj.interpreter, "none")) + retval = "noenhanced"; + else + retval = "enhanced"; + endif + endif +endfunction