Create code and plot