R - 直方图矩形线条粗细

时间:2014-07-12 16:36:34

标签: r histogram

如何使直方图上的实际线条(形成多个矩形)更粗?我想避免使用ggplot

以下是一些生成直方图的代码,以便我们有一个可重现的示例:

h = hist(rnorm(100),plot=F)
plot(h,lwd=4) #note, lwd does not work :(

enter image description here

1 个答案:

答案 0 :(得分:11)

您可以使用par()设置线宽:

opar <- par(lwd=2)
plot(h)
par(opar)

histogram plot

相关问题