save_figure()
Save a figure to the figures output folder.
Usage
save_figure(
plot: Any,
name: str,
format: str = 'png',
width: float = 8,
height: float = 6,
dpi: int = 300,
public: bool = False,
overwrite: bool = True,
**kwargs: Any,
) -> Path
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| plot required | Any |
A matplotlib or seaborn figure (anything with |
|
| name required | str |
File name without extension. |
|
| format | str | 'png' |
png, pdf, svg, jpg, jpeg, or tiff. |
| width | float | 8 |
Width in inches. |
| height | float | 6 |
Height in inches. |
| dpi | int | 300 |
Resolution for raster formats. |
| public | bool | False |
In a sensitive project, save to the public figures folder. |
| overwrite | bool | True |
Replace an existing file. |
| **kwargs | Any |
Passed to |
Value
The saved file.