Skip to content

ggplot2::geom_rect not passed to in ggplotly #2197

Open
@ocelhay

Description

@ocelhay

ggplot2::geom_rect isn't used in ggplotly:

library(dplyr)
library(ggplot2)
library(plotly)

g <- ggplot(starwars,
       aes(x = height, y = mass)) + 
  geom_rect(data = starwars |> filter(sex == "male"),
            aes(fill = sex), xmin = -Inf, xmax = Inf,
            ymin = -Inf, ymax = Inf, alpha = 0.3) +
  geom_point(shape = 1) + 
  facet_grid(sex ~ gender)

g

ggplotly(g)

Screenshot 2022-10-25 at 09 41 40

Screenshot 2022-10-25 at 09 41 55

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