Interactive Plots: lattice

211 views
Skip to first unread message

SSG

unread,
Nov 23, 2015, 10:47:25 PM11/23/15
to Shiny - Web Framework for R
hello,

I noticed that it works for base and ggplot.

Q1: Are there architectural challenges that prevents it from working with lattice graphics?
Q2: Is there roadmap  for interaction with lattice graphics output?

Regards
Saptarshi

SSG

unread,
Nov 23, 2015, 10:53:19 PM11/23/15
to Shiny - Web Framework for R
Interesting.
I just tried this

library(shiny)

ui <- basicPage(
  plotOutput("plot1", click = "plot_click"),
  verbatimTextOutput("info")
)

server <- function(input, output) {
    output$plot1 <- renderPlot({
        x <- runif(100)
        y <- runif(100)
        xyplot(y~x)
  })

  output$info <- renderText({
    paste0("x=", input$plot_click$x, "\ny=", input$plot_click$y)
  })
}

shinyApp(ui, server)


And notice I used xyplot. it worked! Let me see if there are any issues ... I 'm going to guess it wont work with trellis displays ...

Regards
Saptarshi
Reply all
Reply to author
Forward
0 new messages