How to save graph using matplotlib library

+1 vote

Hi Guys,

I am analyzing one dataset with the help of matplotlib module. I am able to plot my graph. But how can I save this graph for future use?

May 21, 2020 in Python by akhtar
• 38,230 points
1,229 views

1 answer to this question.

0 votes

Hi@akhtar,

You can find one function called savefig in matploylib.pypolt module. This function is used to save your plot for future use.

import matplotlib.pyplot as plt
plt.savefig('fig.png')

Hope this will help you.

answered May 21, 2020 by MD
• 95,440 points

Related Questions In Python

0 votes
0 answers

How to save the import csv file to mongodb using pyspark (or python)?

I have this code, and I want ...READ MORE

Oct 9, 2019 in Python by Ahmed
• 310 points
2,070 views
0 votes
1 answer

How to save an image locally using Python in which we already know the URL address?

Hi, @Roshni, The following code is used to ...READ MORE

answered Jun 26, 2020 in Python by Gitika
• 65,910 points
1,532 views
+2 votes
2 answers

How to make a laplacian pyramid using OpenCV python?

down voteacceptTheeThe problem is that you're iterating ...READ MORE

answered Apr 3, 2018 in Python by charlie_brown
• 7,720 points
4,452 views
+1 vote
1 answer

How to create plots using python matplotlib in IPython notebook?

I think you should try: I used %matplotlib inline in ...READ MORE

answered Aug 8, 2018 in Python by Priyaj
• 58,090 points
1,182 views
0 votes
1 answer

I can't get a graph out of my information

Hi@lzzy, According to your error, there is a ...READ MORE

answered Jun 11, 2020 in Python by MD
• 95,440 points
601 views
0 votes
1 answer

ImportError: No module named matplotlib.pyplot

Hi@akhtar, It seems you don't have matplotlib library ...READ MORE

answered Jun 22, 2020 in Python by MD
• 95,440 points
24,342 views
0 votes
1 answer

Error: Can't import matplotlib library.

Install the older version of python, I also ...READ MORE

answered Nov 6, 2020 in Python by Gitika
• 65,910 points
911 views
0 votes
1 answer

How to transfer multiple lines in a file using python?

Hi@akhtar, I don't know it will help you ...READ MORE

answered Mar 31, 2020 in Python by MD
• 95,440 points
838 views
0 votes
1 answer

How to read photo using cv2 module in python?

Hi@akhtar, Yes, you can read your image in ...READ MORE

answered Apr 9, 2020 in Python by MD
• 95,440 points
495 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP