- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- 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 scatterplot using five vectors in a single plot window without separating the plots in R?
To create more than one scatterplot in a single plot window we should create the scatterplot for first vector and then add the point of the remaining vectors by using points function and they can be displayed with different colors so that it becomes easy to differentiate among the points of the vectors.
Consider the below vectors −
x1<-rnorm(5,1,0.5) x2<-rnorm(5,1,0.4) x3<-rnorm(5,1,0.3) x4<-rnorm(5,1,0.2) x5<-rnorm(5,1,0.1) plot(x1)
- Related Articles
- How to create a plot in R with a different plot window size using plot function?
- How to stop par(mfrow) to create multiple plots in one plot window and create only one plot in R?
- How to create scatterplot using ggplot2 without grey background in R?
- How to create a scatterplot in R with legend position inside the plot area using ggplot2?
- How to create a plot in base R without margins?
- Create multiple regression lines in a single plot using ggplot2 in R.
- How to create a scatterplot with two legends using ggplot2 in R?
- How to create a scatterplot with dark points using ggplot2 in R?
- How to create a time series plot in R without time vector?
- How to create a boxplot using ggplot2 for single variable without X-axis labels in R?
- How to create a plot in R with gridlines using plot function?
- How to create a scatterplot in R using ggplot2 with transparency of points?
- How to create scatterplot using data frame columns in R?
- How to join points on a scatterplot with smooth lines in R using plot function?
- How to create a dot plot using ggplot2 in R?