graphinglib.Figure.save#

Figure.save(file_name: str, legend: bool = True, legend_loc: str = '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

Legend location keyword. 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”}. 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_style configuration.