output
slot.renderPlot(expr, width = "auto", height = "auto", res = 72, ...,
env = parent.frame(), quoted = FALSE, func = NULL)
'auto'
to use the offsetWidth
/offsetHeight
of the HTML
element that is bound to this plot. You can also pass in a function that
returns the width/height in pixels png
. Note that this affects the resolution of PNG
rendering in R; it won't change the actual ppi of the browser.png
.
These can be used to set the width, height, background color, etc.expr
.expr
a quoted expression (with quote()
)? This
is useful if you want to save an expression in a variable.expr
instead).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.
div
or img
and have
the CSS class name shiny-plot-output
.plotOutput
. For more details on how the plots are
generated, and how to control the output, see plotPNG
.