Publication quality is typically (at least) 300 dpi. Say your graph is 6 inches wide – then you have 1800 possible X values to plot.
Couldn’t you just bin (or “bucket”) the data by x-value, then compute the mean(y) for each x-value?
That is, for each x value, transform it by
xbin = floor(x;digits=-(trunc(Int,log10(x))-1))
Examples:
julia> x=8.91826e-6
8.91826e-6
julia> xbin=floor(x;digits=-(trunc(Int,log10(x))-1))
8.0e-6
julia> x=0.024963571
0.024963571
julia> xbin=floor(x;digits=-(trunc(Int,log10(x))-1))
0.02
Then, for each distinct x-value 1 to .0001, compute the mean(y) for each “bin”.
Then plot (xbin,ybin)
Note that for each xbin, you could also compute the standard deviation of y, the min of y, and the max of y, if you’d like to plot confidence intervals or ranges as well.
The above is “equal width binning”.
For “equal frequency binning,” you would divide you number of data points by number of bins – so 10 billion / 1800 = 5,555,555.
Sort you data by x – or in your case, it probably is gathered in sorted order already.
Take the first 5,555,555 points. Compute the mean of x and the mean of y for those data points. Store it (xbin,ybin).
Repeat for every batch of 5,555,555 points.
At the end, you will have 1800 values of (xbin,ybin) to plot. The xbin-values won’t be equally spaced like they are in the “equal width binning” method.
It also perhaps let’s you reduce memory usage – as you compute each batch of 5,555,555 points, compute (xbin,ybin), then throw out those points.