output_plot | R Documentation |
Adds a Plotly plot to a webpage, based on specified or selected variables.
output_plot(x = NULL, y = NULL, color = NULL, color_time = NULL,
dataview = NULL, id = NULL, click = NULL, subto = NULL,
options = list(), plotly = TRUE)
x |
The name of a variable, or ID of a variable selector to plot along the x-axis. |
y |
The name of a variable, or ID of a variable selector to plot along the y-axis. |
color |
The name of a variable, or ID of a variable selector to use to color lines. |
color_time |
The ID of a selector to specify which timepoint of |
dataview |
The ID of an |
id |
Unique ID for the plot. |
click |
The ID of an input to set to a clicked line's ID. |
subto |
A vector of output IDs to receive hover events from. |
options |
A list of configuration options, with named entries for any of |
plotly |
Logical; if |
A character vector of the content to be added.
# for mpg ~ wt * am in a site based on mtcars data
output_plot("wt", "mpg", "am")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.