- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to remove border of bars from histogram in base R?
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:
- Related Articles
- How to create a histogram with dots instead of bars in base R?
- How to create histogram like plot with different color of bars in R?
- How to highlight a bar in base R histogram?
- How to change the color of bars in base R barplot?
- How to fill histogram bars using ggplot2 in R with different colors?
- How to increase the thickness of histogram lines in base R?
- How to define the number of breaks in base R histogram?
- How to create a histogram without bins in base R?
- How to increase the X-axis length of histogram in base R?
- How to display zero frequency for bars in base R barplot?
- How to create a horizontal line in a histogram in base R?
- How to remove Index in base R plot?
- Change the outline color for histogram bars using ggplot2 in R.
- How to increase the width of lines for histogram like plots in base R?
- How to change the border line type in base R boxplot?

Advertisements