您可以在GGPLOT2中用
theme()
来照顾它,或者设置为-45°xaxis2
library(dplyr)
library(ggplot2)
library(plotly)
df <- expand.grid(x = 1:10, group = c("a", "b"))
p <- ggplot(df) +
geom_point(aes(x = x, y = x))
p <- p + facet_wrap(~ group)
ggplotly(p) %>% layout(xaxis = list(tickangle = -45),
xaxis2 = list(tickangle = -45))