mpl_bsic.export_figure#
- mpl_bsic.export_figure(fig, filename)[source]#
Export a figure according to BSIC Standards.
First, the function forces the animations to run, making sure that any style is applied before exporting. Additionally, exports the figure in
svg
format, withbbox_inches='tight'
anddpi=1200
.- Parameters:
- fig
Figure
The
matplotlib
figure to export.- filename
str
The filename that should be used when exporting.
- fig
See also
mpl_bsic.apply_bsic_style
Applies the BSIC Style to plots.
mpl_bsic.apply_bsic_logo
Applies the BSIC Logo to plots.
Examples
from mpl_bsic import apply_bsic_style, export_figure x = np.linspace(0,10,100) y = np.sin(x) fig, ax = plt.subplots() ax.plot(x,y) ax.set_title('Sin(x)') apply_bsic_style(fig, ax) export_figure(fig, 'output_filename')