- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- 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 create a histogram without bins in base R?
We can set type argument to s in plot function to create a histogram without bins but first we need to create the histogram and store it in an object. For example, if we have a vector say x then the histogram of x can be stored in an object called p then we can use the command plot(c(p$counts,0),type="s") to create the histogram without bins as shown in the below example.
Example
> x<-rnorm(100) > p<-hist(x)
Output
Example
> plot(c(p$counts,0),type="s")
Output
Advertisements