Completed plot3 for assignment