plotly.R
plotly.R copied to clipboard
ggplotly drops legend if geom_blank is used
library(palmerpenguins)
library(tidyverse)
p <- penguins |>
ggplot(aes(
x = flipper_length_mm,
y = body_mass_g,
col = sex)) +
geom_blank() +
geom_point()
p
plotly::ggplotly(p)