getTable_legendgrouptitle_trace: #' Add legend group title to a plotly plot that already has...

View source: R/plotly.R

getTable_legendgrouptitle_traceR Documentation

#' Add legend group title to a plotly plot that already has legendgroup defined. #' #' @param p a plotly object. #' @param legendgrouptitles default=NULL, or a vector of legendgrouptiles in desired order. #' #' @return a plotly object. If legendgrouptitles supplied, the plot will have legend groups presented in sequence as in legendgrouptitles. #' @export #' add_legendgrouptitle <- function(p, legendgrouptitles=NULL) getTable_legendgrouptitle_trace(p) -> groupMap2 if(is.null(legendgrouptitles)) p |> style_legendgrouptitle(groupMap = groupMap2) -> p1 else p |> style_legendgrouptitle2(groupMap = groupMap2, legendgrouptitles) -> p1 return(p1)

Description

Get the table of legend group title and trace

Usage

getTable_legendgrouptitle_trace(p)

Arguments

p

a plotly object

Value

a data frame


tpemartin/econIDV documentation built on July 2, 2023, 7:36 p.m.