当我尝试修改y轴标题时,它消失了。修改y轴刻度线就可以了。有人遇到过这个问题吗?谢谢!
library(plotly)
set.seed(2017)
x <- seq(1:10)
y <- x + rnorm(10)
plot_ly( x = ~x, y = ~y + rnorm(10)) %>%
layout(
xaxis = list(tickfont = list(size = 15)),
yaxis = list(tickfont = list(size = 25))) ## This works well.
plot_ly( x = ~x, y = ~y + rnorm(10)) %>%
layout(
xaxis = list(tickfont = list(size = 15)),
yaxis = list(titlefont = list(size = 25))) ## This makes the y axis label disappear.
目标是修改y轴标题的大小,而不是使其全部消失。