Turning disp.plot4 into a function.