library(ggplot2)
library(plotly)
dataset = data.frame(x = c(1,10, 100, 1000),
y = c(1000, 100, 10, 1))
p = ggplot(data = dataset, aes(x = x, y = y)) + geom_point() + geom_line() +
scale_x_log10() + scale_y_log10()
ggplotly(p)
With above codes, you can have a plotly graph with tooltip. The x and y axis show the original data. But the values in tooltip is shown as (0,3), (1,2), (2,2), (3,0). What I want in the tooltip is (1, 1000), (10, 100), (100, 10), (1000, 1).
Is there any way to do it?