I have a plotly histogram where x-axis is log tranformed. I'm trying to make my histogram tooltip show the original value rather than the log10-transformed value. I'm referring to this example. Overwriting the text attribute.
Below is my code. However, my tooltip does not show anything. Does anyone know how I can modify the text attributes in this case?
g=iris %>%
#select(Petal.Length) %>%
ggplot(aes(x=Petal.Length))+
geom_histogram()+
scale_x_log10()
gg <- ggplotly(g)
gg$x$data[[1]]$text = paste(x,y)
gg