add_to_legend: add function call to the overall legend

View source: R/modify_legend.R

add_to_legendR Documentation

add function call to the overall legend

Description

add function call to the overall legend

Usage

add_to_legend(object, fun.name, legend.name, call.args, option.args, where)

Examples

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


USGS-R/gsplot documentation built on April 17, 2023, 8:45 p.m.