im having issues with making high quality pictures in R. I'm using ggplot2 and it seems that the standard way to save does not do the anti-aliasing satisfactory. I then looked around and figured that Cairo could do what I wanted. It doesnt though, it tells me that polygon edges are not found, and I have no idea what that means. Using Cairo to plot standard plots works.
Here is an example:
library(ggplot2)
library(Cairo)
#making data of sorts
DF = data.frame("x" = rep(c(10,20),each=100), "y"= rnorm(200))
g = ggplot(DF, aes(x=x,y=y) ) +geom_point(size=3 , position = position_jitter(w = 0.1, h = 0) )
#standard plotting works fine
print(g)
#Cairo plotting does not
CairoPNG("overlay.png", width=4.5, height=4)
print(g)
dev.off()
###Error in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
###polygon edge not found
Im running windows 7, and i have tried updating all packages, reinstalling R and restarting.