|
From: Ethan M. <merritt@u.washington.edu> - 2005-11-14 17:04:38
|
On Monday 14 November 2005 03:38 am, Jonathan Thornburg wrote:
> On Fri, 11 Nov 2005, Ethan A Merritt wrote:
> >>> set size 2,2
> > ^^^^^^^^^^^^^
> > Don't do that.
>
> This leaves unanswered the question of what's the "right" way to
> produce a postscript file whose natural size when printed/viewed is
> larger than the default (in either x and/or y). Until there's an
> alternative mechanism
Sorry, I should have posted a specific announcement here as well as
to the SourceForge tracking list.
Please give a thorough workout to SourceForge patch #1356114
set term post size <foo>in,<baz>in
Also handles units of cm or pixels.
Here is a repeat announcement
Initial Comment:
Enough talking about it, here is actual code.
Synopsis
========
Specify explicit bounding box for postscript-based
terminals in inches, centimeters, or points.
e.g. default is equivalent to
set term post size 10in, 7in
Details
=======
Adds a parsing routine parse_term_size(*x, *y,
default_units) that can be called by any terminal
driver. I've only implemented it for post.trm and
gd.trm, but any terminal that already allows a size can
be trivially converted to use the new routine.
Default_units is either INCHES, CM, or PIXELS.
This tells the routine how to interpreat a bare number
in the size spec. Pixel-based terminals will normally
select PIXELS as the default units, but post.trm
defaults to INCHES.
This will get you US paper size "legal":
set term post landscape size 14, 8.5
This will get you paper size A4:
set term post size 29.7cm, 21.0cm
And this will get you a 3 inch by 5 inch PNG image if
display on a monitor with approximately 72 dpi resolution:
set term png size 3in, 5in
Notes
======
We need some mechanism to specify a resolution other
than 72dpi for pixel-based terminals.
With this in place, there should never be a need for
specifying size > 1 to postscript terminals. This
mechanism gets the bounding box right for large plots,
which the old mechanism never did.
Please give this a workout. I've tested it, but I
don't have any old scripts that produced oversize
postscript images, so I can't easily compare backwards
compatibility in real cases.
--
Ethan A Merritt merritt@u.washington.edu
Biomolecular Structure Center
Mailstop 357742
University of Washington, Seattle, WA 98195
|