Implement plot3