tests/testprefix.R

library(grid)
library(gridSVG)

pdf(file = NULL)

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

# All IDs should now be exported with the prefix "TESTPREFIX"
grid.export("test-prefixes.svg", prefix = "TESTPREFIX")
dev.off()

Try the gridSVG package in your browser

Any scripts or data that you put into this service are public.

gridSVG documentation built on March 31, 2023, 3:09 p.m.