diff scripts/plot/__go_draw_axes__.m @ 7320:70ddbed64bad

[project @ 2007-12-17 19:25:33 by jwe]
author jwe
date Mon, 17 Dec 2007 19:25:33 +0000
parents 5c8f09c7a020
children 359f464342b3
line wrap: on
line diff
--- a/scripts/plot/__go_draw_axes__.m	Mon Dec 17 19:16:27 2007 +0000
+++ b/scripts/plot/__go_draw_axes__.m	Mon Dec 17 19:25:33 2007 +0000
@@ -1051,8 +1051,25 @@
       if (nd == 3)
 	fputs (plot_stream, "set border 895;\n");
       else
-	fputs (plot_stream, "set border 3;\n");
-	fputs (plot_stream, "set xtics nomirror; set ytics nomirror;\n");
+	if (strcmpi (axis_obj.yaxislocation, "right"))
+	  fputs (plot_stream, "unset ytics; set y2tics nomirror\n");
+	  if (strcmpi (axis_obj.xaxislocation, "top"))
+	    fputs (plot_stream, "unset xtics; set x2tics nomirror\n");
+	    fputs (plot_stream, "set border 12;\n");
+	  else
+	    fputs (plot_stream, "unset x2tics; set xtics nomirror\n");
+	    fputs (plot_stream, "set border 9;\n");
+	  endif
+	else
+	  fputs (plot_stream, "unset y2tics; set ytics nomirror\n");
+	  if (strcmpi (axis_obj.xaxislocation, "top"))
+	    fputs (plot_stream, "unset xtics; set x2tics nomirror\n");
+	    fputs (plot_stream, "set border 6;\n");
+	  else
+	    fputs (plot_stream, "unset x2tics; set xtics nomirror\n");
+	    fputs (plot_stream, "set border 3;\n");
+	  endif
+	endif
       endif
     endif