server <- function(input, output) {
ov <- overlayServer("my_plot", 1, 1)
output$my_plot <- shiny::renderPlot({
plot(1:100, sin(1:100 * 0.1), type = "l")
overlayBounds(ov, "base", xlim = c(1, 100))
})
# further server code here . . .
}
Run the code above in your browser using DataLab