# How to remove border of bars from histogram in base R?

R ProgrammingServer Side ProgrammingProgramming

By default, a histogram drawn in base R has black color borders around bars. We might want to remove these black borders to make the histogram visually smooth. This can be done by using lty argument with the hist function. For example, if we have a vector x and we want to create a histogram of x without border of bars then we can use the argument as hist(x,lty="blank").

## Example

> x<-rnorm(10000)
> hist(x)

## Output:

Creating histogram of x without border of bars:

## Example

> hist(x,lty="blank")

## Output:

Updated on 21-Nov-2020 05:58:53