Implement plot3.