plotly.R icon indicating copy to clipboard operation
plotly.R copied to clipboard

geom_tile width and height are ignored in ggplotly

Open cnftstats opened this issue 3 years ago • 0 comments

The height and width parameters of geom_tile are not being taken into account when converted to ggplotly, as shown in the example below.

library(plotly)

X <- data.frame(x = c(1, 2, 1, 2), y = c(1, 1, 2, 2), z = 1:4)
gg <- ggplot(X, aes(x, y)) + geom_tile(aes(fill = z), width = .5, height = .5)

gg
ggplotly(gg)

enter image description here

More information in this stackoverflow post.

cnftstats avatar Apr 04 '22 10:04 cnftstats