r - 如何更改 ggplot geom_histogram() 中的直方图边界线厚度

标签 r ggplot2

我有以下代码:

library(ggplot2)
data(mtcars)
ggplot(mtcars, aes(x=mpg)) + geom_histogram(bins=15, colour='red')

产生这个:

enter image description here

如上所述,如何更改直方图封闭线的粗细?

最佳答案

只需使用 size争论

geom_histogram(bins=15, colour='red',size=2)

关于r - 如何更改 ggplot geom_histogram() 中的直方图边界线厚度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42799553/

相关文章:

r - 更高效的 R/Sweave/TeXShop 工作流程?

r - 是否有 R 脚本可以使用 Excel 电子表格中的内容编写 rmd 文件?

r - R Shiny 的中心 plotly 图

r - R 中带有 ggplot2 的箱线图 - 按月返回

r - Rbrewer 调色板元素的颜色名称

r - 禁用 y 轴刻度和标签

c++ - 使用 C++ 将属性分配给任意 R 对象?

r - 准确设置 ggsave 的大小

r - 有没有一种简单的方法可以用 R 制作水平单层堆叠条形图?

r - 使用 ggplot2 创建类似于 d3.js force layout 的气泡图