# How to create a point chart with point size increment based on the position of the point in 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 cex argument is used to increase or decrease the point size in a point chart created in base R. If we want to create a point chart with points of size in increment manner then we can pass a vector of the same size as the vector for which we want to create the point chart. For example, if we have a vector x that contains 10 elements then cex will be set as cex=1:10.

## Example1

Live Demo

> x<-rpois(10,2)
> plot(x,cex=1:10,xlim=c(1,12),ylim=c(-2,12))

## Output: ## Example

Let’s have a look at another example:

Live Demo

> y<-sample(1:10,10)
> plot(y,cex=1:10,xlim=c(1,12),ylim=c(-1,12))

## Output: 