View source: R/modify_legend.R
add_to_legend | R Documentation |
add function call to the overall legend
add_to_legend(object, fun.name, legend.name, call.args, option.args, where)
gs <- gsplot() %>%
points(x=1:5, y=1:5, legend.name = 'points 1') %>%
legend()
gs
gs <- gsplot() %>%
points(x=1:2, y=1:2, col = c("red", "blue"),
legend.name = c('points 1', 'points 2')) %>%
legend()
gs
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.