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

Click to Enlarge


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

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250