![]() |
VOOZH | about |
Seaborn provides a way to store the final output in different desired file formats like .png, .pdf, .tiff, .eps, etc. Let us see how to save the output graph to a specific file format.
Import the inbuilt penguins dataset from seaborn package using the inbuilt function load_dataset.
Finally, use savefig function and give the desired name and file type to store the plot. The below example stores the plot as a .png file in the current working directory.
Output:
Here we want to save the seaborn graph as a Joint Photographic Experts Group file so we are giving it's extension as .jpg.
Output:
Here we want to save the seaborn graph as Tag Image file format file so we are giving it's extension as .tiff.
Output:
Here we want to save the seaborn graph in a particular folder so we are giving the specified path for saving it.
Output: