In the minimal example below, where the color scale is log-transformed, the z value displayed when hovering the mouse above the raster is also log-transformed.
This is very uninformative and I need it to be expressed in the same unit as the scale legend.
Is it possible to avoid plotly to automaticaly do this conversion?
library(plotly)
library(reshape2)
library(RColorBrewer)
myPalette <- colorRampPalette(brewer.pal(11, "Spectral"))
p <- volcano %>%
melt() %>%
ggplot(aes(Var1, Var2, fill = value)) + geom_tile() +
scale_fill_gradientn(colours = rev(myPalette(100)), trans="log")
ggplotly(p)
