dynamo.pl.save_fig¶
- dynamo.pl.save_fig(path=None, prefix=None, dpi=None, ext='pdf', transparent=True, close=True, verbose=True)[source]¶
Save a figure from pyplot.
Code adapated from http://www.jesshamrick.com/2012/09/03/saving-figures-from-pyplot/
- Parameters:
path (
Optional[str] (default:None)) – the path (and filename, without the extension) to save_fig the figure to. Defaults to None.prefix (
Optional[str] (default:None)) – the prefix added to the figure name. This will be automatically set accordingly to the plotting function used. Defaults to None.dpi (
Optional[int] (default:None)) – the resolution in dots per inch. If None, defaults to 300 DPI. If ‘figure’, uses the figure’s dpi value. Defaults to None.ext (
str(default:'pdf')) – the file extension. This must be supported by the active matplotlib backend (see matplotlib.backends module). Most backends support ‘png’, ‘pdf’, ‘ps’, ‘eps’, and ‘svg’. Defaults to “pdf”.transparent (
bool(default:True)) – whether to save the figure with axes patches and background transparent. Defaults to True.close (
bool(default:True)) – whether to close the figure after saving. If you want to save_fig the figure multiple times (e.g., toformats) (multiple)
True. (you should NOT close it in between saves or you will have to re-plot it. Defaults to)
verbose (
bool(default:True)) – whether to print information about when and where the image has been saved. Defaults to True.
- Return type: