When I change the default font to "Times New Roman", the negative numbers are not displayed correctly. I was wondering what the problem is and how I can solve it. I am using either plt.rcParams["font.family"] = "Times New Roman" or plt.rc('font',family='Times New Roman'). Here are the pictures for default font and new font, respectively.

As @WillemVanOnsem mentioned in the comment below original question, it can be solved by using plt.rcParams['axes.unicode_minus'] = False
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With