Open
Description
ggplotly does not carry over the alpha level for stat_summary_2d. Seems like it may be similar to the same issue that occurred with points in a previous version.
This isn't as obvious in the reproducible example, but for regions where the map isn't just water, and the locations are more dense, having the alpha allows for a visible basemap.
fiji <- get_googlemap("Fiji", zoom = 5, maptype = "roadmap", color = "bw", size = c(640, 480), scale = 2)
ggplotly({
ggmap(fiji, extent = "device") +
stat_summary_2d(data = quakes, aes(x = long, y = lat, z = mag), alpha = .55 , fun = mean, bins = 100) +
scale_fill_gradient(name = "Fullness", low = "green", high = "red")
}, tooltip = "fill"
)