Skip to content

geom_GeomShape() not implemented #1266

Closed
@GarryGelade

Description

@GarryGelade

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions