set_node_labelsGrob <- function(loon.grob, whichIsDeactive) {
newGrob <- grid::getGrob(loon.grob, "graph labels")
which_is_active <- setdiff(1:length(newGrob$children), whichIsDeactive)
lapply(which_is_active,
function(i){
newGrob$children[[i]] <<- do.call(
grid::textGrob,
getGrobArgs(newGrob$children[[i]])
)
}
)
grid::setGrob(
gTree = loon.grob,
gPath = "graph labels",
newGrob = newGrob
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.