I saw this graphics on the Economist\'s website and wondered if it\'s possible to pro
gridSVG offers support for svg features unavailable to the R engine, such as fill patterns and arbitrary clipping. This example can easily be adapted for ggplot2,
library(grid)
library(gridSVG)
require(ggplot2)
p <- ggplot(df3, aes(what, units)) +
geom_bar(colour="black", stat="identity") +
coord_flip()
pattern <- pattern(circleGrob(r=.4, gp=gpar(fill="grey")),
width=.05, height=.05)
registerPatternFill("circles", pattern)
gridsvg("pattern.svg")
print(p)
grid.force()
grid.patternFill("geom_rect.rect", grep=TRUE, group=FALSE,
label=rep("circles", length(levels(df3$what))))
dev.off()