Add a trace to a plotly visualization
add_trace(p = last_plot(), ..., group, color, colors, symbol, symbols, size,
data = NULL, evaluate = FALSE)
A plotly object.
These arguments are documented in the references section below. Note that acceptable arguments depend on the trace type.
Either a variable name or a vector to use for grouping. If used, a different trace will be created for each unique value.
Either a variable name or a vector to use for color mapping.
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
.
Either a variable name or a (discrete) vector to use for symbol encoding.
A character vector of symbol types. Possible values: 'dot', 'cross', 'diamond', 'square', 'triangle-down', 'triangle-left', 'triangle-right', 'triangle-up'
A variable name or numeric vector to encode the size of markers.
A data frame to associate with this trace (optional). If not
provided, arguments are evaluated using the data frame in plot_ly()
.
logical. Evaluate arguments when this function is called?
plot_ly()