Mercurial > hg > octave-terminal
changeset 7390:3a21ee84a432
[project @ 2008-01-16 19:27:20 by jwe]
author | jwe |
---|---|
date | Wed, 16 Jan 2008 19:27:21 +0000 |
parents | 4d0d6c357bc6 |
children | f071480b7eac |
files | scripts/ChangeLog scripts/plot/__go_draw_axes__.m |
diffstat | 2 files changed, 38 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,5 +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. + * startup/__finish__.m: New file. * startup/Makefile.in (SOURCES): Add it to the list. (install install-strip, uninstall): Handle function files.
--- 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