The startup_code.py module#
Summary#
Save the PyVista plot to file and return as base64. |
|
Return the current Matplotlib plot as a base64-encoded PNG image. |
Description#
Startup code for PyMechanical persistent Python session.
This module contains helper functions and configurations that are loaded when the persistent Python session starts.
Module detail#
- startup_code.save_plot(plotter) str#
Save the PyVista plot to file and return as base64.
- Parameters:
- plotter
pv.Plotter PyVista plotter to save.
- plotter
- Returns:
strBase64 data URI of the plot.
- startup_code.save_matplotlib_plot(dpi=150)#
Return the current Matplotlib plot as a base64-encoded PNG image.
- startup_code.MATPLOTLIB_AVAILABLE = True#
- startup_code.PYVISTA_AVAILABLE = True#