Base R scatter plot is extremely useful, it’s quick and easy to understand, unless you have large number of data points, like in this example. It is quite difficult to follow what is going on here. Looks ugly as well !
Let’s try our very own ggplot way, and see how it looks like. But instead we plot the density of the data points, and we can see that the data is clustered around the center.
# plot the 2D density using ggplot2ggplot(df, aes(x = x, y = y)) +stat_density_2d_filled(bins =20) +scale_fill_scico_d(palette ="lajolla", direction =-1) +theme_minimal() +theme(legend.position ="none")
You can also experiment with different bin sizes, to explore any patterns, write some function to do it.