vuecore.engines.plotly.saver module

Contents

vuecore.engines.plotly.saver module#

vuecore.engines.plotly.saver.save(fig: Figure, filepath: str) None[source]#

Saves a Plotly figure to a file, inferring the format from the extension.

This utility provides a single interface for exporting a figure to various static and interactive formats.

Parameters:
  • fig (go.Figure) – The Plotly figure object to save.

  • filepath (str) – The destination path for the file (e.g., ‘my_plot.png’, ‘figure.html’). The format is determined by the file extension.

Return type:

None

Raises:
  • ValueError – If the file extension is not one of the supported formats.

  • ImportError – If required libraries for image export (e.g., kaleido) are not installed.