From roebuck at mdanderson.org  Wed Feb  8 22:33:11 2006
From: roebuck at mdanderson.org (Paul Roebuck)
Date: Wed, 8 Feb 2006 15:33:11 -0600 (CST)
Subject: [Rd]  invalid graphics state using dev.print (fwd)
Message-ID: <Pine.OSF.4.58.0602081515590.512812@wotan.mdacc.tmc.edu>

On Mon, 6 Feb 2006 18:12, Simon Urbanek wrote:

> On Feb 6, 2006, at 5:24 PM, Paul Roebuck wrote:
>
>> Tried on R-Sig-Mac with no responses, but I need some kind
>> of answer.
>> [...]
>> Does the following work on your system?
>
> Interesting, no, it doesn't either. For png and pdf I use
> Quartz + quartz.save (it produces much nicer results) so
> I didn't really notice, but you're right. First I thought
> those graphics state issues are specific to the Quartz
> device, but you have proven that it's not. It's in fact
> not even Mac-specific - I have just reproduced it on a
> Linux box - that's why I'm moving this to R-devel.

It's been several workdays now with no responses. Could
someone try the last three lines of code and see if they
get the following error message?

> x11()
> plot(rnorm(10))
> dev.print(png)

Error in dev.copy(device = function (filename = "Rplot%03d.png", width =
480,  :
	invalid graphics state

> traceback()
6: dev.copy(device = function (filename = "Rplot%03d.png", width = 480,
       height = 480, pointsize = 12, gamma = 1, colortype =
getOption("X11colortype"),
       maxcubesize = 256, bg = "white", fonts = getOption("X11fonts"),
       res = NA)
   .Internal(X11(paste("png::", filename, sep = ""), width, height,
       pointsize, gamma, colortype, maxcubesize, bg, bg, fonts,
       res)), width = 6.98715785526809, height = 6.99452568428947)
5: eval(expr, envir, enclos)
4: eval(expr, p)
3: eval.parent(oc)
2: dev.off(eval.parent(oc))
1: dev.print(png)

I noticed it on OS X, and Simon on Linux. Other platforms?
WFM?

TIA

> version
         _
platform powerpc-apple-darwin7.9.0
arch     powerpc
os       darwin7.9.0
system   powerpc, darwin7.9.0
status   Patched
major    2
minor    2.1
year     2006
month    02
day      01
svn rev  37245
language R

----------------------------------------------------------
SIGSIG -- signature too long (core dumped)



[Rd] invalid graphics state using dev.print (fwd)
Paul Roebuck