peikert / proteomics

package development
1 stars 0 forks source link

Ignoring explicitly provided widget ID "fcfd29930da9"; Shiny doesn't use them #35

Closed peikert closed 7 years ago

peikert commented 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
peikert commented 7 years ago

https://github.com/ropensci/plotly/issues/985