Open
Description
I'm trying to convert a ggplot that has alpha
in its aesthetics (it needs to be variable), which works perfectly in ggplot, but ggplotly()
outputs an error.
set.seed(666)
y <- rpois(1000, 2.9)
table(y)
holdThis <- as.data.frame(table(y))
holdThis$cumTotal <- cumsum(holdThis$Freq)
holdThis$percentage <- (as.numeric(holdThis$Freq)/10000) * 100
holdThis$y <- as.numeric(as.character(holdThis$y))
p <- ggplot(holdThis, aes(x=y, y=Freq, alpha = Freq)) + geom_bar(stat='identity', fill= 'blue', color="black", size = .25) + scale_x_discrete(breaks = y)