The startup_code.py module#

Summary#

save_plot

Save PyVista plot to file and optionally return as base64.

save_matplotlib_plot

Return the current Matplotlib plot as a base64-encoded PNG image.

Description#

Startup code for PyMAPDL MCP.

Module detail#

startup_code.save_plot(plotter: pyvista.Plotter) str#

Save PyVista plot to file and optionally return as base64.

Parameters:
plotterpv.Plotter

The PyVista plotter to save

Returns:
str

File path or base64 data URI

startup_code.save_matplotlib_plot(dpi=150)#

Return the current Matplotlib plot as a base64-encoded PNG image.

Parameters:
dpiint

Resolution in dots per inch

Returns:
str

File path or base64 data URI