library(SVGAnnotation)
if(require(vcd)) {
data(Titanic)
mos = svgPlot(m <- mosaic(~ Sex + Age + Survived, data = Titanic,
main = "Survival on the Titanic", shade = TRUE, legend = TRUE))
annotateMosaic(mos, m)
saveXML(mos, "titanicMosaic.svg")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.