2012年2月2日星期四

using Cairo to make your R plot better


Antialias plotting in R using Cairo


before
after
install.packages(c("Cairo"), repos="http://cran.r-project.org" )
library(Cairo)
CairoPNG('new-style.png')
plot(x, y, main='Test plot', pch=21, col='blue', bg='lightblue')
abline(lm(y ~ x), col='red', lwd=2)
dev.off()

没有评论:

发表评论