publiplots.save_multiple¶
- publiplots.save_multiple(basename, formats=None, **kwargs)[source]¶
Save the same figure in multiple formats.
Convenience wrapper around
savefig()for saving a figure in several formats with a shared base name (e.g., PNG for presentations and PDF for publications). Each format inherits publiplots’ savefig defaults, includingbbox_inches=None.- Parameters:
Examples
Save in default formats (PNG and PDF):
>>> import publiplots as pp >>> pp.save_multiple('results/figure1')
Save in custom formats:
>>> pp.save_multiple('figure1', formats=['png', 'svg', 'eps'])Save with custom DPI:
>>> pp.save_multiple('figure1', formats=['png'], dpi=1200)See also
savefigSave a single figure with publiplots defaults.