starting plot code