add histogram plotting