Reputation: 64044
I have the following code:
library(ggplot2)
data(mtcars)
ggplot(mtcars, aes(x=mpg)) + geom_histogram(bins=15, colour='red')
Which produce this:
As stated there, how can I change the thickness of the enclosing line of the histogram?
Upvotes: 13
Views: 19055
Reputation: 147
Just tested on ggplot2, the size
aesthetic for lines was deprecated in ggplot2 version 3.4.0.
You can do the same using linewidth
.
ggplot(mtcars, aes(x=mpg)) +
geom_histogram(bins=15, colour='red', linewidth=0.2)
Upvotes: 0
Reputation: 109
In addition, to program in point space, I used the following function:
MyPoints <- function(desired_points){
return (unit(desired_points*.5*(1/1.07), "point"))
}
geom_histogram(size=MyPoints(1))
Upvotes: 0
Reputation: 2769
Easy enough :)
ggplot(mtcars, aes(x=mpg)) + geom_histogram(bins=15, colour='red',size=3)
Upvotes: 8