plot code