Update for broken plots

Edited code based on feedback from peer assessment