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 in Python by akhtar
• 24,830 points
219 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 by MD
• 55,740 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
754 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 in Python by Gitika
• 36,930 points
120 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,780 points
2,665 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
• 57,640 points
312 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 in Python by MD
• 55,740 points
66 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 in Python by MD
• 55,740 points
1,664 views
+1 vote
1 answer

How to handle Real-Time Matplotlib Plotting

To draw a continuous set of random ...READ MORE

answered Sep 26, 2018 in Python by Priyaj
• 57,640 points
9,302 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 in Python by MD
• 55,740 points
106 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 in Python by MD
• 55,740 points
60 views