Plotter.export_html#
- Plotter.export_html(filename: str | Path | None) StringIO | None[source]#
Export this plotter as an interactive scene to a HTML file.
- Parameters:
- filename
str|Path Path to export the html file to.
- filename
- Returns:
StringIOIf filename is None, returns the HTML as a StringIO object.
Notes#
You will need trame installed.
Examples#
Download Python source code | Download Jupyter notebook
>>> import pyvista as pv
>>> from pyvista import examples
>>> mesh = examples.load_uniform()
>>> pl = pv.Plotter(shape=(1, 2))
>>> _ = pl.add_mesh(mesh, scalars='Spatial Point Data', show_edges=True)
>>> pl.subplot(0, 1)
>>> _ = pl.add_mesh(mesh, scalars='Spatial Cell Data', show_edges=True)
>>> pl.export_html('pv.html')
Deprecated since version 0.49.0: Use plotter.trame.export_html(...) instead. This method
now proxies to that registered plotter component (provided by
the trame-pyvista package).