Plotly R: setting the spacing between axis label and axis ticks labels

后端 未结 5 836
轮回少年
轮回少年 2021-02-14 04:58

Is there any way to set a spacing between axis labels and axis ticks labels other than changing margins?

Example plot:

plot_ly(mtcars, x = ~ wt, y = ~ pa         


        
5条回答
  •  无人共我
    2021-02-14 05:35

    Use the standoff option

    library(plotly)
    
    y <- list(
      title = list(text="Y Axis",standoff=20)
    )
    
    plot_ly(mtcars, x = ~ wt, y = ~ paste0(hp, '0000'))%>%layout(yaxis=y)
    

提交回复
热议问题