library(tidyverse)Let us create a data set and store it in a data frame.
set.seed(42) x <- rnorm(100, mean=5, sd=20) y <- x + rnorm(100, mean=1, sd=20) df <- data.frame(x=x, y=y)Let us use the above dataframe to make scatter plot with ggplot2 in R. In ggplot2, geom_point() function helps us make scatter plot. After defining the aesthetics for ggpot2, we can add geom_point() to make scatter plot.
df %>% ggplot(aes(x=x,y=y)) + geom_point()Here we have the simple scatter plot that we just made. Are you making a scatter plot with a lots of data points? Then your scatter plot might suffer from overplotting. Check out this post Scatter plots with transparent data points to make a better scatter plot without overplotting.