Updating plot code