Closed peikert closed 7 years ago
work around (have to been fixed in the plotly package)
p <- plot_ly(local_df, x = ~k, y = ~score, type = 'scatter', mode = 'lines', colors = c('black','red'), hoverinfo = 'text', text = ~paste( 'k: ', k, '<br>db-index: ', round(score,2) ) ) %>% # ggplotly(tooltip = c('k','score')) %>% add_markers(color = col_vec) %>% config(displayModeBar = F) %>% layout( showlegend = FALSE, xaxis = list(title = "Number of cluster (k)"), yaxis = list(title = "Davies-Bouldin index") )%>% add_annotations(x = local_df$k[best], y = local_df$score[best], text = 'best k', xref = "x", yref = "y", showarrow = TRUE, arrowhead = 4, arrowsize = .5, ax = 20, ay = -40) p$elementId <- NULL p
https://github.com/ropensci/plotly/issues/985
work around (have to been fixed in the plotly package)