Plots 3 and 4 with data.table speedups.