# HG changeset patch # User jwe # Date 1200511635 0 # Node ID 4036b9a748867c179be0da3c305898e53842860c # Parent 26b667edc07a2a69de59e821633a6f3e1b3ff0ae [3-0-0-branch @ 2008-01-16 19:27:14 by jwe] diff -r 26b667edc07a -r 4036b9a74886 scripts/ChangeLog --- a/scripts/ChangeLog Tue Jan 15 00:49:28 2008 +0000 +++ b/scripts/ChangeLog Wed Jan 16 19:27:15 2008 +0000 @@ -1,3 +1,8 @@ +2008-01-16 John W. Eaton + + * 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 * plot/__go_draw_axes__.m (get_fontname_and_size): Use strcmpi diff -r 26b667edc07a -r 4036b9a74886 scripts/plot/__go_draw_axes__.m --- a/scripts/plot/__go_draw_axes__.m Tue Jan 15 00:49:28 2008 +0000 +++ b/scripts/plot/__go_draw_axes__.m Wed Jan 16 19:27:15 2008 +0000 @@ -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