Small changes to histogram plotting function.