Finish plotting code