i'm trying to make the default font type to "Times New Roman" in matplotlib but its saying "/usr/local/lib/python3.6/dist-packages/matplotlib/font_manager.py:1241: UserWarning: findfont: Font family ['times new roman'] not found. Falling back to DejaVu Sans. (prop.get_family(), self.defaultFamily[fontext]))". but when i'm using the key word "Times new roman" it's not showing me the above error but still i'm pretty sure that the folt that is being generated is not Times New Roman
please help, i need Times new roan font as the default one
import matplotlib.pyplot as plt
plt.rcParams["font.family"] = "times new roman"
plt.figure(figsize=(10,8))
plt.plot([1,2,3], [1,2,3])
plt.title('title', fontsize = 30)
plt.xlabel('title', fontsize = 30)
plt.savefig("/content/after.png", dpi = 500, bbox_inches='tight')
plt.show()
before using "Times new roman" after using "Times new roman"