Skip to content
Prev 19520 / 63424 Next

invalid graphics state using dev.print (fwd)

Hi
Martin Maechler wrote:
I think the problem is that the width and height of the PNG device is 
being taken (without regard for units) from the X11 device.  So 
approximately 7 inches square screen window gets drawn into 
approximately 7 *pixel* square PNG file and (understandably) R complains 
that there is not enough room for the plot.  Another workaround is 
something like ...

dev.print(png, width=480, height=480)

... and a fix requires making dev.print() smarter so that it figures out 
that it needs to convert width/height from inches to pixels.

Paul