r-plotly
How to choose variable to display in tooltip when using ggplotly?
You don’t need to modify the plotly object as suggested by @royr2. Just add label = name as third aesthetic ggplot(data = d, aes(x = seq, y = value, label = name)) + geom_line() + geom_point() and the tooltip will display name in addition to seq and value. The ggplotly help file says about tooltip … Read more
Switch displayed traces via plotly dropdown menu
First of all, you should take care about plots which add multiple traces (see nTracesA etc.) Besides changing the trace visibility you’ll need to seperate categorial and numerical data onto separate x and y-axes and manage their visibility, too (see xaxis2, xaxis3, xaxis4 – this also works with a single y-axis but in this case … Read more
plotly: Updating data with dropdown selection
Is this what you were after? require(plotly) df <- data.frame(x = runif(200), y = runif(200), z = runif(200)) p <- plot_ly(df, x = ~x, y = ~y, mode = “markers”, name = “A”, visible = T) %>% layout( title = “Drop down menus – Styling”, xaxis = list(domain = c(0.1, 1)), yaxis = list(title = … Read more