Mercurial > hg > octave-terminal
changeset 8901:821f0242e8c1
gnuplot_drawnow.m: Fix unintended shift of plot image for the gnuplot postscript+eps terminal.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Tue, 03 Mar 2009 00:45:00 -0500 |
parents | 63ad1133d0ed |
children | 5d5db7a347c6 |
files | scripts/ChangeLog scripts/plot/gnuplot_drawnow.m |
diffstat | 2 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2009-03-03 Ben Abbott <bpabbott@mac.com> + + * plot/gnuplot_drawnow.m: Fix unintended shift of plot image for + the gnuplot postscript+eps terminal. + 2009-03-02 Jaroslav Hajek <highegg@gmail.com> * pkg/pkg.m (fix_depends): Fix & simplify splitting the string.
--- a/scripts/plot/gnuplot_drawnow.m +++ b/scripts/plot/gnuplot_drawnow.m @@ -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