Implemented plot clearing