0
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)
有了上面的代码,你可以有工具提示的情节图。 x和y轴显示原始数据。但工具提示中的值显示为(0,3),(1,2),(2,2),(3,0)。我在工具提示中需要的是(1,1000),(10,100),(100,10),(1000,1)。改变工具提示中的数值在阴谋
有没有办法做到这一点?
谢谢!这非常聪明。 – Vera0816