![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
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 with main title in the outer margin of plot window in base R?
The main title of a histogram in base R can be inserted by using title function and if we want to have it in the outer margin then outer argument must be set to TRUE. If the outer argument does not fulfil our requirement then we can use par function to adjust the outer margin area and create the histogram. Check out the below example to understand how it works.
Example
> x<-rnorm(5000,1,0.35) > hist(x) > title('Normal Distribution',outer=TRUE)
Output
Example
> par(oma=c(0,0,2,0)) > hist(x) > title('Normal Distribution',outer=TRUE)
Output
Advertisements