graphinglib.Figure.save#
- Figure.save(file_name: str, legend: bool = True, legend_loc: str | tuple = 'best', legend_cols: int = 1, dpi: int | None = None) None[source]#
Saves the
Figure.- Parameters:
- file_namestr
The name of the file to save the figure to (including the file extension).
- legendbool
Wheter or not to display the legend. Defaults to
True.- legend_locstr or tuple
Legend location keyword or tuple. Any value in {“best”, “upper right”, “upper left”, “lower left”, “lower right”, “right”, “center left”, “center right”, “lower center”, “upper center”, “center”} or {“outside upper center”, “outside center right”, “outside lower center”}. Tuple contains floats relative to the plots size;
(1, 1)is equivalent to the upper right corner. Defaults to “best”.- legend_colsint
Number of columns in the legend. Defaults to 1.
- dpiint
The resolution of the saved figure. Only used for raster formats (e.g. PNG, JPG, etc.). Default depends on the
figure_styleconfiguration.