plot histogram of all massses, output as pdf