plot code and png