changing plot code