I have plotly
graphics where I'd like to change axis tick mark labels to specific strings. Consider the following example:
library(plotly)
p <- plot_ly(data = iris, x = ~Sepal.Length, y = ~Petal.Length)
Say I want to supress all numeric xaxis tick mark labels and instead only plot the string "min" at x = 4.5
and "max" at x = 8
.
How can I achieve this in plotly
?
Sidenote: I know this is possible for base R plots, e.g. here and in ggplot2
by setting scale_x_continuous(breaks = c(4.5, 8), labels= c("4.5" = "min", "8" = "max"))
.
Is there also a way to achieve this in plotly
?
..Unfortunately the plotly
docs don't seem to offer a solution..