Articles → Matplotlib → Savefig Function In Matplotlib

Savefig Function In Matplotlib






Purpose





Example


import matplotlib.pyplot as plt

fig = plt.figure()

fig, axes = plt.subplots(nrows = 2, ncols= 2)  # a figure with a 2x2 grid of Axes

fig.savefig("test.jpg")



Output




Picture showing the output of savefig function in matplotlib



Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, June 12, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250