alphapepttools.pl.save_figure#
- alphapepttools.pl.save_figure(fig, filename, output_dir, dpi=None, transparent=False, **kwargs)#
Save a figure in a publication friendly format
- Parameters:
fig (matplotlib.pyplot.Figure) – The figure to save
filename (str) – The filename to save the figure. Must have a supported extension. If no extension is given, the figure will be saved as a .png file.
output_dir (str) – The directory to save the figure in. Will be created in case it does not exist.
dpi (int, optional) – The resolution of the figure, taken by default from config
transparent (bool, optional) – Whether to save a .png figure with a transparent background.
**kwargs – Additional keyword arguments to pass to fig.savefig
- Return type: