is it possible to remove the trace labels in the annotations when using ggplotly?
For example:
library(ggplot2)
library(plotly)
g <- ggplot(iris, aes(Sepal.Width, Sepal.Length)) +
geom_point() +
annotate("rect", xmin = 4, xmax = 5, ymin = 4, ymax = 5,
colour = "MediumSeaGreen", fill = "MediumSeaGreen", alpha = 0.3)
ggplotly(g)
Here, how would I get rid of the 'trace 1' when I hover over the green box? I would like to keep the hover on the points though.
Note: Also posted here: https://community.rstudio.com/t/can-you-get-rid-of-the-trace-labels-in-the-annotations-when-using-ggplotly-ggplot2-with-plotly/129754