The ``startup_code.py`` module ============================== .. py:module:: ansys.mapdl.mcp.python_helper.startup_code Summary ------- .. py:currentmodule:: startup_code .. tab-set:: .. tab-item:: Functions .. list-table:: :header-rows: 0 :widths: auto * - :py:obj:`~save_plot` - Save PyVista plot to file and optionally return as base64. * - :py:obj:`~save_matplotlib_plot` - Return the current Matplotlib plot as a base64-encoded PNG image. Description ----------- Startup code for PyMAPDL MCP. .. !! processed by numpydoc !! Module detail ------------- .. py:function:: save_plot(plotter: pyvista.Plotter) -> str Save PyVista plot to file and optionally return as base64. :Parameters: **plotter** : :obj:`pv.Plotter` The PyVista plotter to save :Returns: :class:`python:str` File path or base64 data URI .. !! processed by numpydoc !! .. py:function:: save_matplotlib_plot(dpi=150) Return the current Matplotlib plot as a base64-encoded PNG image. :Parameters: **dpi** : :class:`python:int` Resolution in dots per inch :Returns: :class:`python:str` File path or base64 data URI .. !! processed by numpydoc !!