Open talgalili opened 8 years ago
Unfortunately, heatmap traces in plotly.js don't currently support specification of a "stroke" around cells. For now, if you want to mimic that first plot, you'll have to use geom_rect()
Thanks @cpsievert. I hope the plotly.js will be updated so that this could be resolved.
Hi @cpsievert any news regarding this issue?
Thanks.
Still not fixed 5 years later. I think plotly must have a singe developer who does about 1 small fix per month.
It is indeed a shame. Then again, it's open source, it's how it is sometimes...
On Tue, Oct 26, 2021 at 11:21 AM Robin Edwards @.***> wrote:
Still not fixed 5 years later. I think plotly must have a singe developer who does about 1 small fix per month.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/plotly/plotly.R/issues/699#issuecomment-951695664, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHOJBVFHFRGAPO6Q6O6XRDUIZXIVANCNFSM4COHP7GQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Friends, I found a workaround. It's not great if you have a lot of tiles because it makes a whole additional layer but this seems to work geom_tile(fill = NA, color = "white")
library(tidyverse)
library(plotly)
({
diamonds |>
count(clarity, color) |>
ggplot(aes(clarity, color, fill = n)) +
geom_tile() +
geom_tile(fill = NA, color = "white", size = 1) # <--- here
}) |>
ggplotly()
While this bug is "small", it is effecting heatmaply behavior so a fix would be very helpful.
Following is a reproducible example with the plots of ggplot2 and plotly:
ggplot2:
plotly (notice the grey borders are missing)