I need to plot over 10,000 points on a single scatter plot, and there are many points overlapping with each other. This makes the entire PDF file very large, which is undesired.
Since I am using ggplot2
for producing all the plots, I wonder if there is any function that can avoid plotting the many overlapping points, say, using hues?
I know that stat_hexbin
may work in such cases, but I am thinking of some approach similar to the smoothScatter
function in base-R graphics. If we could use some kind of density presented in color gradient that would be great. Thanks!