plotOutput

plotOutput(outputId, width = "100%", height = "400px", clickId = NULL,
  hoverId = NULL, hoverDelay = 300, hoverDelayType = c("debounce",
  "throttle"), inline = FALSE)

Arguments

outputId output variable to read the plot from
width,height Plot width/height. Must be a valid CSS unit (like "100%", "400px", "auto") or a number, which will be coerced to a string and have "px" appended. These two arguments are ignored when inline = TRUE, in which case the width/height of a plot must be specified in renderPlot(). Note that, for height, using "auto" or "100%" generally will not work as expected, because of how height is computed with HTML/CSS.
clickId If not NULL, the plot will send coordinates to the server whenever it is clicked. This information will be accessible on the input object using input$clickId. The value will be a named list or vector with x and y elements indicating the mouse position in user units.
hoverId If not NULL, the plot will send coordinates to the server whenever the mouse pauses on the plot for more than the number of milliseconds determined by hoverTimeout. This information will be accessible on the input object using input$clickId. The value will be NULL if the user is not hovering, and a named list or vector with x and y elements indicating the mouse position in user units.
hoverDelay The delay for hovering, in milliseconds.
hoverDelayType The type of algorithm for limiting the number of hover events. Use "throttle" to limit the number of hover events to one every hoverDelay milliseconds. Use "debounce" to suspend events while the cursor is moving, and wait until the cursor has been at rest for hoverDelay milliseconds before sending an event.
inline use an inline (span()) or block container (div()) for the output

Value

A plot output element that can be included in a panel

Description

Render a renderPlot within an application page.

Note

The arguments clickId and hoverId only work for R base graphics (see the graphics package). They do not work for grid-based graphics, such as ggplot2, lattice, and so on.

Examples

# Show a plot of the generated distribution mainPanel( plotOutput("distPlot") )
<div class="col-sm-8"> <div id="distPlot" class="shiny-plot-output" style="width: 100% ; height: 400px"></div> </div>