code and png for plot3