PlottingΒΆ

The default plot for a Surface is a 2d false color plot. The plot can be generated by the Surface.plot_2d() method, which returns the matplotlib figure and axis. Using the Surface.show() method has the same effect but also calls plt.show and does not return anything. By default, in a Jupyter environment, the Surface.show() method will be invoked as a repr method when the surface object is put on the last line of a cell.

In total, Surface objects defines these plotting methods:

All plotting methods except plot_3d use matplotlib and return the Figure and Axes objects. All plotting methods implement a save_to keyword argument, which is None by default. If specified, the method saves the plot as an image file with the specified file extension.

3d-plotting requires the following optional dependencies: pyvista, trame, trame-vtk, trame-vuetify, trame-components. You can install these by installing surfalize with optional dependency [3d]:

pip install surfalize[3d]