Description Usage Arguments Details Interactive plots See Also
Renders a reactive plot that is suitable for assigning to an output
slot.
1 2 3 | renderPlot(expr, width = "auto", height = "auto", res = 72, ...,
env = parent.frame(), quoted = FALSE, execOnResize = FALSE,
outputArgs = list())
|
expr |
An expression that generates a plot. |
width, height |
The width/height of the rendered plot, in pixels; or
|
res |
Resolution of resulting plot, in pixels per inch. This value is
passed to |
... |
Arguments to be passed through to |
env |
The environment in which to evaluate |
quoted |
Is |
execOnResize |
If |
outputArgs |
A list of arguments to be passed through to the implicit
call to |
The corresponding HTML output tag should be div or img and have
the CSS class name shiny-plot-output.
With ggplot2 graphics, the code in renderPlot should return a ggplot
object; if instead the code prints the ggplot2 object with something like
print(p), then the coordinates for interactive graphics will not be
properly scaled to the data space.
See plotOutput for more information about interactive plots.
For the corresponding client-side output function, and example
usage, see plotOutput. For more details on how the plots are
generated, and how to control the output, see plotPNG.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.