https://analytics-note.xyz/programming/matplotlib-save-dpi/

plt.rcParams["figure.dpi"] = 150