tests/testclasses.R

library(grid)
library(gridSVG)

pdf(file = NULL)

pushViewport(viewport())
grid.rect()
grid.circle()
grid.text("hello, world!")
popViewport()

# All grobs and viewports should now be exported with a class attribute
# holding the value of their R class()
grid.export("test-classes.svg", addClasses = TRUE)
dev.off()
sachsmc/gridSVG documentation built on May 29, 2019, 12:44 p.m.