I am doing some graphics in R. The resulting PDF files do not display properly on iOS devices such as iPhone. For example, here's a ggplot2 drawing created as a PDF:
library(ggplot2)
mpg.eg <- within(mpg[1:74,], {
model <- reorder(model, cty)
manufacturer <- reorder(manufacturer, -cty)
})
pdf(file="figures/ios-example.pdf")
p <- qplot(cty, model, data=mpg.eg)
p + facet_grid(manufacturer ~ ., scales="free", space="free") +
opts(strip.text.y = theme_text())
dev.off()
When viewed on an iPhone, dotted lines are not displayed. See, for example, the resulting pdf if you are on an iOS device.
As far as I understand from reading documents, this is most likely a problem with the limited availability of fonts and the vagaries of rendering PDF on iOS, and not a problem with creating pdfs in R. I thought it was possible to embed fonts in PDF using
embedFonts("figures/ios-example.pdf")
will understand, but it’s not. Is there anything I can do to get around this issue with iOS, except that it is available in a different format?