1

I would like to create custom modebar buttons for heatmap graphs (e.g., box selection, lasso selection). It is possible to edit specific Mode Bar buttons through the config argument descriptions, but I don't know how to implement this javascript code to add buttons in R.

You can set dragmode to "select":

p = plot_ly(z = matrix(runif(100), 10, 10), type = "heatmap") %>%
layout(dragmode =  "select")

which gives the desired behavior, but if you select any other tools, you can’t get back to the select tool.

0 Answers0