add code and write-up for #4- diagnostic plots