Closed wch closed 10 years ago
The res argument affects font sizes in base graphics, but doesn't seem to affect font sizes in grid graphics.
library(Cairo) packageVersion('Cairo') # [1] ‘1.5.3’ # Base graphics CairoPNG('test-Cairo-72.png', width=250, height=250, res=72) plot(1:10, 1:10) dev.off() CairoPNG('test-Cairo-144-2x.png', width=500, height=500, res=144) plot(1:10, 1:10) dev.off() # Grid graphics (with ggplot2) library(ggplot2) Cairo('test-Cairo-ggplot2-72.png', width=250, height=250, res=72) qplot(1:10, 1:10) dev.off() Cairo('test-Cairo-ggplot2-144-2x.png', width=500, height=500, res=144) qplot(1:10, 1:10) dev.off()
Excellent, thanks!
The res argument affects font sizes in base graphics, but doesn't seem to affect font sizes in grid graphics.