octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'paperpositionmode' change to rid gnuplot_set_term: size is zero


From: Daniel J Sebald
Subject: 'paperpositionmode' change to rid gnuplot_set_term: size is zero
Date: Sat, 03 Jan 2009 00:30:09 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020

In using print for EPS files, I see the error message:

gnuplot_set_term: size is zero

The reason is that the paperposition is set at [0 0 0 0] and the default 
setting is 'manual'.  Perhaps the default should be 'auto'.

In any case, here is a patch that will sett a reasonable default for the 'auto' 
setting.  It may not be the best solution, so perhaps John or Dave could have a 
look since they're two of the few people that have larger change-sets for 
gnuplot_drawnow.m.

Dan
diff -Pur octave/scripts/ChangeLog octave-mod/scripts/ChangeLog
--- octave/scripts/ChangeLog    2009-01-02 23:59:33.587408393 -0600
+++ octave-mod/scripts/ChangeLog        2009-01-03 00:12:06.466405428 -0600
@@ -1,3 +1,8 @@
+2009-01-02  Daniel J Sebald <address@hidden>
+
+       * plot/gnuplot_drawnow.m: Add default paper size for 'auto' mode of
+       'paperpositionmode'.
+
 2008-12-29  David Bateman  <address@hidden>
 
        * goemetry/voronoi.m: Speed up and handle dense grids.
diff -Pur octave/scripts/plot/gnuplot_drawnow.m 
octave-mod/scripts/plot/gnuplot_drawnow.m
--- octave/scripts/plot/gnuplot_drawnow.m       2009-01-02 23:57:07.034926535 
-0600
+++ octave-mod/scripts/plot/gnuplot_drawnow.m   2009-01-03 00:10:08.309390128 
-0600
@@ -311,7 +311,11 @@
   t.inches      = 1.00;
   papersize = get_papersize (h);
   paperunits = get (h, "paperunits");
-  paperposition = get (h, "paperposition") / t.(paperunits);
+  if (strcmpi (get (h, "paperpositionmode"), "manual"))
+    paperposition = get (h, "paperposition") / t.(paperunits);
+  else
+    paperposition = [0 0 4.5 3.375] / t.(paperunits);
+  endif
   if (strcmpi (paperunits, "normalized"))
     plotsize = papersize .* paperposition(3:4);
   else

reply via email to

[Prev in Thread] Current Thread [Next in Thread]