Reputation: 1196
I have a plotly
plot, but I am having trouble with the hover text. In the plot made by the code below, it is very difficult to see hover text unless I move my mouse very carefully or if I zoom in very close to the peak. How can I fix this to make the hover text appear just bypassing my mouse over the peak, even if the peak is very thin like in this example?
library(plotly)
out = data.frame(x = seq(10000, length.out = 1000), y = rep(c(rep(0, 99), 100), 10))
plot_ly(
x = out$x,
y = out$y,
type = "bar"
)
Upvotes: 0
Views: 383
Reputation: 2949
As mentioned in my comment, x variable is a continuous scale. Bar plot will work better for categorical variable or for histogram. Try converting the x variable as category variable and plot.
Upvotes: 1