[英]Plotly in R: how to increase the space between bars?
朋友們!
如果我在R中使用plotly繪制條形圖,默認情況下,條形之間沒有間距。
我的問題是:
非常感謝!
使用數字x軸時會發生這種情況...嘗試輸入as.factor(VARIABLE)
示例:計算包含您正在繪制的df =數據框的漸變類的行數; x =您正在繪制的變量
plot_ly(df,x = df $ x)
-this gives you a messy looking blob
plot_ly(df,x = as.factor(df $ x))
-now it is known that your x axis is a factor, it will separate each value and break it up with a space in between
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.