changeset 10789:6f640ed5bb93

__gnuplot_print__.m: Fix broken options.
author Ben Abbott <bpabbott@mac.com>
date Wed, 14 Jul 2010 19:29:02 -0400
parents c69252eb2f2b
children 01f1643dfbb1
files scripts/ChangeLog scripts/plot/__gnuplot_print__.m
diffstat 2 files changed, 14 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Wed Jul 14 10:44:12 2010 -0700
+++ b/scripts/ChangeLog	Wed Jul 14 19:29:02 2010 -0400
@@ -1,3 +1,8 @@
+2010-07-14  Ben Abbott <bpabbott@mac.com>
+
+	* plot/__gnuplot_print__.m: Fix broken options "-orientation",
+	"-special_flag", "-debug_file", "-tight_flag", and "-printer".
+
 2010-07-14  Rik <octave@nomad.inbox5.com>
 
        * linear-algebra/normest.m: Improve documentation.  Add better input
--- a/scripts/plot/__gnuplot_print__.m	Wed Jul 14 10:44:12 2010 -0700
+++ b/scripts/plot/__gnuplot_print__.m	Wed Jul 14 19:29:02 2010 -0400
@@ -231,13 +231,13 @@
 
     elseif (strcmp (dev, "fig"))
       ## XFig
-      options = orientation;
+      options = opts.orientation;
       if (opts.use_color >= 0)
         options = " color";
       else
         options = " mono";
       endif
-      options = cstrcat (options, " ", special_flag);
+      options = cstrcat (options, " ", opts.special_flag);
       if (! isempty (opts.fontsize))
         options = cstrcat (options, " fontsize ", opts.fontsize);
       endif
@@ -370,11 +370,11 @@
     endif
 
     if (strcmp (termn, "postscript") && ! strncmp (dev, "eps", 3))
-      if (isempty (orientation))
-        orientation = paperorientation;
+      if (isempty (opts.orientation))
+        opts.orientation = paperorientation;
       endif
       ## This is done here to accommodate ghostscript conversion.
-      options = cstrcat (orientation, " ", options);
+      options = cstrcat (opts.orientation, " ", options);
     end
 
     new_terminal = cstrcat (termn, " ", options);
@@ -458,7 +458,7 @@
          endif
     endif
       if (opts.debug)
-        drawnow (new_terminal, opts.name, mono, debug_file);
+        drawnow (new_terminal, opts.name, mono, opts.debug_file);
       else
         drawnow (new_terminal, opts.name, mono);
       endif
@@ -487,7 +487,7 @@
     end_unwind_protect
 
     if (! isempty (ghostscript_output))
-      if (is_eps_file && tight_flag)
+      if (is_eps_file && opts.tight_flag)
         ## If gnuplot's output is an eps-file then crop at the bounding box.
         fix_eps_bbox (name, ghostscript_binary);
       endif
@@ -526,10 +526,10 @@
         ## FIXME - besides Unix and Windows, what other OS's might be considered.
         prn_opt = "";
       endif
-      if (isempty (printer))
+      if (isempty (opts.printer))
         prn_cmd = sprintf ("lpr %s '%s' 2>&1", prn_opt, printname);
       else
-        prn_cmd = sprintf ("lpr %s -P %s '%s' 2>&1", prn_opt, printer, printname);
+        prn_cmd = sprintf ("lpr %s -P %s '%s' 2>&1", prn_opt, opts.printer, printname);
       endif
       [status, output] = system (prn_cmd);
       if (status != 0)