# How to change the font size of main title of boxplot in base R?

R ProgrammingServer Side ProgrammingProgramming

#### Artificial Intelligence : The Future Of Programming

15 Lectures 54 mins

#### Beyond Basic Programming - Intermediate Python

Most Popular

36 Lectures 3 hours

#### C Programming from scratch- Master C Programming

Best Seller

60 Lectures 8 hours

The font size of the main title of boxplot can be changed by defining the font size value using par(cex.main=”size”), here size value can be changed based on our requirement. This needs to be done before creating the boxplot, otherwise, there will be no effect on the size of the main title.

## Example

Live Demo

x<−rnorm(50)
par(cex.main=0.5)
boxplot(x,main="boxplot")

## Output

Creating the plot with different font size of main title −

## Example

par(cex.main=2.5)
boxplot(x,main="boxplot")

## Output

Updated on 05-Feb-2021 08:34:42

Advertisements