added figure code for COM distribution