[英]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.