- Related Questions & Answers
- How to display mean in a boxplot with cross sign in base R?
- How to create a plot in R with gridlines using plot function?
- How to display star/asterisk sign (*) inside a base R plot?
- How to create a plot in R with a different plot window size using plot function?
- How to add approximately equal sign in a plot using ggplot2 in R?
- How to create a staircase plot in R?
- How to create a bar plot with ggplot2 using stat_summary in R?
- How to create a plot with dashed regression line in base R?
- How to create a residual plot in R with better looking aesthetics?
- How to create plot in R with different shape of points?
- How to create stacked plot with density using ggplot2 in R?
- How to create a plot with reversed Y-axis labels in base R?
- How to create a plot title with unicode characters using ggplot2 in R?
- How to create a bar plot with bars for missing values in R?
- How to create correlation matrix plot in R?

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

In base R, the plot with different shape of points can be created by using pch argument inside the plot function but if we want to use any sign that is not designed for pch argument by default then we should pass that particular sign. For example, if we want to use cross sign then we can use letter x with pch as pch = "x".

Consider the below vector and create the plot by displaying cross sign using letter x −

x<-1:10 plot(x,pch="x")

y<-rnorm(10) plot(y,pch="x")

z<-rpois(10,3) plot(z,pch="x")

Advertisements