Add figure saving and 3D visualization.