changeset 9050:e15f4197d907

__go_draw_axes__.m: Properly position the title for 3D plots when using the gnuplot (v4.3+) backend.
author Ben Abbott <bpabbott@mac.com>
date Fri, 27 Mar 2009 18:10:38 -0400
parents 56018fcd28b0
children 089bd295e4f7
files scripts/ChangeLog scripts/plot/__go_draw_axes__.m
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,8 @@
+2009-03-27  Ben Abbott <bpabbott@mac.com>
+
+	* plot/__go_draw_axes__.m: Properly position the title for 3D plots
+	when using the gnuplot (v4.3+) backend.
+
 2009-03-27  Jaroslav Hajek  <highegg@gmail.com>
 
 	* linear-algebra/expm.m: Fix order of outputs from balance.
--- a/scripts/plot/__go_draw_axes__.m
+++ b/scripts/plot/__go_draw_axes__.m
@@ -100,9 +100,14 @@
 	else
 	  fontspec = sprintf ("font \"%s,%d\"", f, s);
 	endif
-	fprintf (plot_stream, "set title \"%s\" %s %s;\n",
+	fprintf (plot_stream, "set title \"%s\" %s %s",
 		 undo_string_escapes (tt), fontspec,
 		 __do_enhanced_option__ (enhanced, t));
+	if (nd == 3)
+	  fprintf (plot_stream, " offset screen 0, screen %.3f;\n", pos(4)/5);
+	else
+	  fprintf (plot_stream, ";\n");
+	endif
       endif
     endif