R/comment.R

Defines functions primToDev.comment.grob commentGrob grid.comment

Documented in commentGrob grid.comment

grid.comment <- function(comment, name = NULL, vp = NULL) {
    grid.draw(commentGrob(comment, name, vp))
}

commentGrob <- function(comment, name = NULL, vp = NULL) {
    g <- grob(name = name, vp = vp, cl = "comment")
    g$comment <- comment
    cl <- class(g)
    class(g) <- unique(c("comment.grob", cl))
    g
}

primToDev.comment.grob <- function(x, dev) {
    svgComment(x$comment, dev@dev)
}

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, 11:17 p.m.