Thanks for the hints! I was originally wondering the difference between grDevices::png(type='cairo') and Cairo::CairoPNG() for the case pch=16, a solid point without border. Cairo does a nice job for such point symbols, but png() renders them very poorly.
Regards, Yihui -- Yihui Xie <xieyi...@gmail.com> Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, Oct 22, 2013 at 9:09 AM, Simon Urbanek <simon.urba...@r-project.org> wrote: > The Cairo package does "smart" anti-aliasing - it aligns lines that are > perpendicular to the axes such that they centered at pixels. That avoids the > anti-aliasing effects that Brian was talking about for the heatmap example. > This enables Cairo to have full anti-aliasing support and still render > heatmaps without artifacts. > > However, there is no way around the anti-aliasing artifacts if you use > arbitrary polygons without borders. For example: > > library(deldir) > plot(c(-1,1),c(-1,1),ty='n') > for(p in tile.list(deldir(rnorm(200),rnorm(200)))) > polygon(p$x,p$y,col=heat.colors(15)[runif(1,1,15)], border=NA) > > That said, in our experience the Cairo approach works very well in practice. > > Cheers, > Simon ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel