-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ggplotly export of tile geometry fails. #47
Comments
Thanks a lot for the example code! Your intuition was right: geom_tile is not supported yet. We'll let you know when it's done. |
👍 Thanks a lot! |
Any idea when this will be supported or any potential workarounds? I got the same error for geom_bin2d and stat_bind2d. Thanks for the updates |
Hey @drewbo, we'd love to see your example code! One workaround could be trying out some of the native functions on Plotly? Our docs are here: plot.ly/r, and the latest for what you can do with ggplot2 support is at plot.ly/ggplot2. |
Hello @powernap and thanks for your patience! Right now in Plotly your library(plotly)
# Your initial data frame (up to randomization...)
test <- data.frame(
x = rep(c(1,3,6),2),
y = rep(c(1,3), each = 3),
w = rep(c(.5,2,1), 2),
z = sample(rep(LETTERS[1:6])))
# Define a function to map letter back to its index in the alphabet (sorry!)
let2ind <- function(x) which(LETTERS == as.character(x))
# Create new dimension z2
test$z2 <- sapply(test$z, let2ind)
# Plot tiles for z2 instead of z
tilePlot2 <- ggplot(test) + geom_tile(aes(x=x, y=y, fill=z2, width=w))
tilePlot2 # Looks different; play with color scales?
# Send to Plotly
py <- plotly()
py$ggplotly(tilePlot2) As of yet, we don't support as much flexibility as ggplot2 in terms of controlling per-x width: Hope this helps! |
Hi @mkcor, thanks for this response! It looks good, I think I can work with this! Keep up the great work 👍 |
I don't know if I do something wrong or tiles are not yet supported by the exporter. When running
I get the following Error:
The text was updated successfully, but these errors were encountered: