Usage
add_trace(p = last_plot(), ..., group, color, colors, symbol, symbols, size,
data = NULL, evaluate = FALSE)
Arguments
...
These arguments are documented in the references section below.
Note that acceptable arguments depend on the trace type.
group
Either a variable name or a vector to use for grouping. If used,
a different trace will be created for each unique value.
color
Either a variable name or a vector to use for color mapping.
colors
Either a colorbrewer2.org palette name (e.g. "YlOrRd" or "Blues"),
or a vector of colors to interpolate in hexadecimal "#RRGGBB" format,
or a color interpolation function like colorRamp
.
symbol
Either a variable name or a (discrete) vector to use for symbol encoding.
symbols
A character vector of symbol types. Possible values:
'dot', 'cross', 'diamond', 'square', 'triangle-down', 'triangle-left', 'triangle-right', 'triangle-up'
size
A variable name or numeric vector to encode the size of markers.
data
A data frame to associate with this trace (optional). If not
provided, arguments are evaluated using the data frame in plot_ly()
. evaluate
logical. Evaluate arguments when this function is called?