I want to use the font 'Times New Roman' for my matplotlib plots. I tried the command:
import matplotlib as mpl
mpl.rcParams["font.family"] = "serif"
mpl.rcParams["font.serif"] = "Times New Roman"
When I just use these lines, it is fine.
But when I want to create a plot. For example a piechart with a title.
plt.pie(data, ...)
plt.title('Piechart')
plt.show()
It get this Error:
WARNING:matplotlib.font_manager:findfont: Generic family 'serif' not found because none of the following families were found: Times New Roman
Can you please explain to me what I am doing wrong and which steps I need to take.