I have a plotly graph in R with a reversed x-axis. I want to be able
to play with its ranges. I know it is normal that it does not work because by design, setting
"range" turns “autorange” to “FALSE”. https://plot.ly/r/reference/#layout-xaxis-range
Setting xaxis = list(range = c(5,3) does not work either. Still the full x-axis.
But I STILL need to modify the ranges of this reversed axes. Any workarounds, anyone?
library(plotly) s <- seq(1, 8) plot_ly(x = s, y = s) %>% add_trace(y = rev(s)) %>% layout( xaxis = list(range = c(3,5), autorange="reversed"), yaxis = list(range = c(2, 5))