Histogram without border

This posts explains how to get rid of histograms border in Basic R. It is purely about appearance preferences.

Histogram Section About histogram

Basically, you just need to add border=F to the hist function to remove the border of histogram bars.

# Create data 
my_variable=c(rnorm(1000 , 0 , 2) , rnorm(1000 , 9 , 2))
# Draw the histogram with border=F
hist(my_variable , breaks=40 , col=rgb(0.2,0.8,0.5,0.5) , border=F , main="")

Related chart types


❤️ 10 best R tricks ❤️

👋 After crafting hundreds of R charts over 12 years, I've distilled my top 10 tips and tricks. Receive them via email! One insight per day for the next 10 days! 🔥