plotly.R
plotly.R copied to clipboard
ggplotly does not show point size legend for geom_point
When using ggploty on a geom_point plot the point size legend is not shown.
Minimal example to reproduce:
library(ggplot2)
library(plotly)
p <- ggplot(mtcars, aes(x = wt,
y = mpg,
size = qsec))
p <- p + geom_point()
ggplotly(p)
Expected output from ggplot:
Ouput of ggplotly:
It does, however, show the color legend.
p <- ggplot(mtcars, aes(x = wt,
y = mpg,
color = qsec))
p <- p + geom_point()
ggplotly(p)

Freshly installed R 4.2.1, plotly_4.10.0 and ggplot2_3.3.6.
I realized that bubble charts in plotly also don't have a size legend as described in #705. Is there any update on this?