VOOZH about

URL: https://www.geeksforgeeks.org/python/how-to-save-seaborn-plot-to-a-file-in-python/

⇱ How to Save Seaborn Plot to a File in Python? - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

How to Save Seaborn Plot to a File in Python?

Last Updated : 23 Jul, 2025

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.

Saving a Seaborn Plot to a File in Python

Import the inbuilt penguins dataset from seaborn package using the inbuilt function load_dataset.

👁 Save Seaborn Plot to a File
Save Seaborn Plot to a File

Saving the plot as .png:

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:

👁 Image
Save Seaborn Plot to a File in Python

Saving the Seaborn graph as .jpg

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:

👁 Image
Save Seaborn Plot to a File in Python

Saving the Seaborn graph as .tiff

Here we want to save the seaborn graph as Tag Image file format file so we are giving it's extension as .tiff.

Output:

👁 Image
Save Seaborn Plot to a File in Python

To save the seaborn plot to a specific folder,

Here we want to save the seaborn graph in a particular folder so we are giving the specified path for saving it.

Output:

👁 Image
Save Seaborn Plot to a File in Python
Comment
Article Tags: