- Trending Categories
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 point chart with point size increment based on the position of the point in R?
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
> 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:
> y<-sample(1:10,10) > plot(y,cex=1:10,xlim=c(1,12),ylim=c(-1,12))
Output:
- Related Articles
- How to create a point chart with empty points using ggplot2 in R?
- How to create a point chart for categorical variable in R?
- How to create a point chart in R with alternative points having different shape?
- How to create a point chart for cumulative sums using ggplot2 in R?
- How to change the point size in geom_point conditionally in R?
- How to join points in a point chart with lines using ggplot2 in R?
- How to change default point size of geom_point in R?
- Dynamic highlight data point on Excel chart
- How to display mean for each group in point chart using ggplot2 in R?
- How to join the points of a point chart if X-axis values are categorical in R using ggplot2?
- How to add comment to a data point in an Excel chart?
- C++ Program to Apply Above-Below-on Test to Find the Position of a Point with respect to a Line
- How to add a single data point in an Excel line chart?
- Set variable point size in Matplotlib
- Create a Point plot with SeaBorn – Python Pandas

Advertisements