[R] ggplot 2 semi-transparency error

Dieter Menne dieter.menne at menne-biomed.de
Wed Aug 19 09:19:58 CEST 2009




rajesh j wrote:
> 
> I used the command ggplot as follows...
> p<-ggplot(a,aes(x=a$V1,colour=a$V2,fill=a$V2))
> p +  geom_density(alpha = 0.2,xlim=c(-10,10),ylim=c(0,0.5))
> 
> when I say,
> dev.print(device=postscript,file="/alpha/dct.pdf")
> I get
> 
> Warning message:
> In grid.Call.graphics("L_polygon", x$x, x$y,
> list(as.integer(1L:length(x$x)))) :
>   semi-transparency is not supported on this device: reported only once
> per
> page
> 
> 

It is a bit unconventional to expect a pdf when using the postscript device,
that might explain the error when you open it, because you created a ps
file.

My personal preference is not to use dev.print at all, but to open the
output device before doing the plot.

A self-contained example would be nice.

Dieter


-- 
View this message in context: http://www.nabble.com/ggplot-2-semi-transparency-error-tp25038236p25039037.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list