A scatter plot uses dots to represent values for two different numeric variables and is used to observe relationships between those variables. To plot scatterplot with R programming, we can use ggplot() function chained with a
geom_point() function.
Syntax :
geom_point(size, color, fill, shape, stroke)
Parameter :
size : Size of Points
color : Color of Points/Border
fill : Color of Points
shape : Shape of Points in range from 0 to 25
stroke : Thickness of point border
You can set a simple scatter plot, grouped scatter plots, and scatter plots with a linear regression smoothed line upon it.
#rprogramming
#rstudio
#ggplot
#scatterplot
#regression
#rdatacode
Download
0 formats
No download links available.
R programming | Scatter plots with ggplot2 in R | NatokHD