Is there a way to get plotly to display the hover text on multiple lines/get it to recognize special characters line '\n' in the text?
A dummy version of what I'm looking to do is:
data <- data.frame(cbind(rnorm(10, 8), rnorm(10, 2)))
names(data)<-c("thing1", "thing2")
data$hovertext <- paste("here's a coordinate: ",
round(data$thing1,1), sep = "\n")
p <- plot_ly(data, type = 'scatter', x = thing1, y = thing2,
text = hovertext, hoverinfo = 'text', mode = "markers")
Which of course just ignores the separator and prints all on one line. Can I trick plotly/R into recognizing that line break?
` and *not* `
` – the latter will not work. – adilapapaya Oct 17 '16 at 15:41
`, `
`, and `
` are three different tags; the first two work, the third will not – rawr Apr 02 '17 at 16:54