Feature request: availability to change canvas size wile printing with the driver Postscript

Ben Abbott bpabbott at mac.com
Sun Oct 26 18:03:02 CDT 2008


On Oct 21, 2008, at 8:46 PM, John W. Eaton wrote:

> On 21-Oct-2008, François Poulain wrote:
>

(snip)

> |
> | With this piece of code, anyone can control canvas size of  
> Postscript driver, with a command like
> | print('essai.eps', '-S2,1')
>
> I think a better fix would be to make the papersize property work.
>
> jwe

For the next several days, I won't have the time to put together a  
patch but I did look into what might be done to allow the gnuplot  
backend to respect the figure properties "pagesize", "pageposition",  
"paperunits", "position", and "units".

When printing the properties "pagesize", "pageposition", and  
"paperunits" should be respected.

For on screen rendering "position", and "units" should be respected.

For vector type terminals (epslatex, pdf, postscript, pslatex, pstex),  
the gnuplot commands which may be used to control the "pagesize" are

	set term <terminal_type> size <XX>{units} <YY>{units}

The "pageposition" may be controlled by setting margins

	set bmargin {<margin>}
	set lmargin {<margin>}
	set rmargin {<margin>}
	set tmargin {<margin>}

The units for the margins are character heights/widths (if someone  
knows exactly how to interpret that, please reply).

For on screen rendering (or for bitmaps), gnuplot does not explicitly  
control where its windows are displayed, so "position(1:2)" are moot.  
However, it is possible to tell gnuplot what the width, "position(3)",  
and height, "position(4)" are.

	set term <terminal type> size <XX> <YY>

where the units are implicitly pixels.

For on screen rendering, we might assume 1in == 72dpi (implying that  
points=pixels) and for bitmaps 1in == 600 dpi. However, if someone  
knows of a method to automatically determine the on screen dpi, and/or  
how gnuplot might specify the intended dpi of the bitmap output please  
reply. For the latter, the more appropriate question is how gnuplot  
relates pixes to points.

So, to review, my questions are;

(1) How does gnuplot relate character width/height of the margins to  
points/inches/etc?

(2) How does gnuplot determine on screen dpi?

(3) How does gnuplot determine the dpi of bitmap output?

Ben






More information about the Bug-octave mailing list