我的电子邮件标签被裁剪了,你知道我该怎么解决吗?代码:library(ggplot2) p<-ggplot(data=english, aes(x=V1, y=V3))+ geom_bar(stat="identity", fill="steelblue") + labs(x="Letter", y="Frequency") + geom_text(aes(label=V3), vjust=0.4, hjust=-0.1, size=3.5) p + coord_flip() 图表: 这是一个关于IT技术的图表。
在ggplot中的y轴定义中使用ylim选项(因为你后面使用了coord_flip),类似这样: scale_y_continuous(limits = c(min(english[,"V3"]), max(english[,"V3"])+5)
c(min(V3),max(V3)+5)
。我没有看到您使用coord_flip
,所以应该是 y 轴。 - Alejandro Andradegeom_bar
中更改width = 0.1
。 - Alejandro Andrade