Closed
Description
I am trying to display Voronoi tiles in RShiny/Plotly.
I get the message
Warning in geom2trace.default(dots[[1L]][[3L]], dots[[2L]][[1L]], dots[[3L]][[1L]]) :
geom_GeomShape() has yet to be implemented in Plotly.
The reprex below shows a working ggplot2 chart, followed by the same chart converted to Plotly. The Plotly chart does not display the tiles.
library(shiny)
library(ggplot2)
library(plotly)
library(deldir)
ui <- fluidPage(
plotOutput("plot1"),
plotlyOutput("plot2")
)
server <- function(input, output) {
output$plot1 <- renderPlot({
fig <- ggplot(iris, aes(Sepal.Length, Sepal.Width)) +
geom_voronoi_tile(aes(fill = Species)) +
geom_voronoi_segment()
fig
})
output$plot2 <- renderPlotly({
fig <- ggplot(iris, aes(Sepal.Length, Sepal.Width)) +
geom_voronoi_tile(aes(fill = Species)) +
geom_voronoi_segment()
fig <- plotly_build(fig)
fig
})
}
shinyApp(ui, server)
Metadata
Metadata
Assignees
Labels
No labels