Mercurial > hg > octave-nkf
diff scripts/plot/print.m @ 14206:df695e37d404
Make sure "print '-SX,Y' ..." doesn't round down a pixel. Bug # 35307.
The eps output from gnuplot and gl2ps each specify whole numbrer bboxs.
Modify ghostscript's resolution to ensure output size is correct. Also
adjust fontisize to compenstate for resolution change.
* __print_parse_opts__.m: Set ghostscript resolution to 72 to ensure all
bboxs have whole numbers. Add a scalefontsize variable to enable fontsize
to be compensated for change in resolution.
* print.m: Modify fontsize property value to compensate for change in
ghostscript resolution.
* __gnuplot_drawnow__.m: Increase precision for specified canvas size.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Tue, 17 Jan 2012 07:23:36 -0500 |
parents | 72c96de7a403 |
children | ce2b59a6d0e5 |
line wrap: on
line diff
--- a/scripts/plot/print.m +++ b/scripts/plot/print.m @@ -370,6 +370,10 @@ else fontsize = opts.fontsize; endif + if (! isempty (opts.scalefontsize) && ! opt.scalefontsize != 1) + ## This is done to work around the bbox being whole numbers. + fontsize = fontsize * opts.scalefontsize; + endif set (h(ishandle(h)), "fontsize", fontsize); endif endif