atlas_protocol_scripts.pl.save_fig_mfmt#

atlas_protocol_scripts.pl.save_fig_mfmt(fig, res_dir, filename, fmt='all', **kwargs)#

Save a matplotlib or altair figure in the specified format(s) to the given directory with the given filename.

Parameters
  • fig – The matplotlib or altair figure to save.

  • res_dir (str) – The directory in which to save the figure.

  • filename (str) – The name to use for the figure file.

  • fmt (Literal['all', 'pdf', 'png', 'svg'] (default: 'all')) – The format in which to save the figure. Default is “all”, which saves the figure in all supported formats. Supported formats are “pdf”, “svg”, “png”.

  • **kwargs – Additional keyword arguments to be passed to the savefig method of matplotlib or the save method of altair.

Return type

None

Returns

None

Raises

AssertionError – If the specified plot_provider is not supported or if the specified fmt is not supported.: