Takes N samples from a given random number generator (RNG) and plots the resulting distribution.