add plot code and graphics