all-pairs histogram. histogram + fft plotting