I am struggling with saving figures with ppi. I know how to save figs with dpi and set figure size but have no idea with ppi. When I search, I could know the dictionary definition but not related to setting codes.
If I want to set the figure size as 8cm*10cm with 2800 resolution in pixels (or 500ppi), how can I set the figure and save figs?
The below code is the way I usually made. e.g.
cm=1/2.54
fig=plt.figure(figsize=(8*cm,10*cm))
(my code)
plt.savefig('Name.jpg', dpi=300)
I tried to search the way to save figures in ppi, but most reviews were related to setting dpi with changed fig size. I know they are connected each other but it was hard to understand how I can set the code.
I am expecting to make a code with fixed fig size and ppi.