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

后端 未结 5 831
轮回少年
轮回少年 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:21

    What I typically do is make use of the ticksuffix option which can create additional space behind a label.

    layout(
          xaxis = list(title = "", automargin=T, ticksuffix = "%")
         ,yaxis = list(title = "", automargin=T, ticksuffix = "   ")
    )
    

提交回复
热议问题