# HG changeset patch # User Ben Abbott # Date 1236059100 18000 # Node ID 821f0242e8c153592b1232ca4fa3c0d3bb255aa6 # Parent 63ad1133d0eda7e0a10dacd3a53c1705dfa8980d gnuplot_drawnow.m: Fix unintended shift of plot image for the gnuplot postscript+eps terminal. diff -r 63ad1133d0ed -r 821f0242e8c1 scripts/ChangeLog --- a/scripts/ChangeLog Mon Mar 02 13:00:59 2009 +0100 +++ b/scripts/ChangeLog Tue Mar 03 00:45:00 2009 -0500 @@ -1,3 +1,8 @@ +2009-03-03 Ben Abbott + + * plot/gnuplot_drawnow.m: Fix unintended shift of plot image for + the gnuplot postscript+eps terminal. + 2009-03-02 Jaroslav Hajek * pkg/pkg.m (fix_depends): Fix & simplify splitting the string. diff -r 63ad1133d0ed -r 821f0242e8c1 scripts/plot/gnuplot_drawnow.m --- a/scripts/plot/gnuplot_drawnow.m Mon Mar 02 13:00:59 2009 +0100 +++ b/scripts/plot/gnuplot_drawnow.m Tue Mar 03 00:45:00 2009 -0500 @@ -76,8 +76,14 @@ function implicit_margin = gnuplot_implicit_margin (term, opts_str) ## gnuplot has an implicit margin of 50pts for PS output. - if (strcmpi (term, "postscript") && isempty (strfind (opts_str, "eps"))) - implicit_margin = 50/72; + if (strcmpi (term, "postscript")) + if (isempty (strfind (opts_str, " eps")) + && isempty (strfind (opts_str, "eps "))) + implicit_margin = 50/72; + else + ## When zero, the behavior of gnuplot changes. + implicit_margin = 1/72; + endif else implicit_margin = 0.0; endif