Articles → Matplotlib → Dpi Attribute In Savefig Function In Matplotlib

Dpi Attribute In Savefig Function In Matplotlib






DPI





Purpose





Example


import matplotlib.pyplot as plt
fig = plt.figure()
fig, axes = plt.subplots(nrows = 2, ncols= 2) 
fig.savefig("test.jpg", dpi=800)



Output




Picture showing the output of the dpi attribute in savefig function in matplotlib



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

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250