Multiple reactive conductors in ggplot call

Hi @Noj! Welcome!

I'm afraid it looks like there are a couple of errors preventing your example from running:

  • the library() statements are missing
  • both inputs are called Var1, but the server() code references input$Var2

(Maybe take a look at the tips in our Shiny Debugging & Reprex Guide?)

However, I suspect the source of the problem you're asking about is just a typo — you seem to be missing the + between your two geom_line() layers. Try this, instead:

    p <- ggplot() +
      geom_line(data = out(), aes(x = x, y = y)) +
      geom_line(data = out2(), aes(x = x, y = y), color = "red")

2 Likes