Updated plot script