Solve Matplotlib in Times New Roman font can not change the font
problem:
When using times new roman font in the drawing, the default is bold, and you can not adjust the thickness of property by weight.
method:
- Locate the directory
/Users/jc/anaconda3/lib/python3.6/site-packages/matplotlib
under thefont_manager.py
file, which will beweight_dict
theroman
property commented out. - python code was added
matplotlib.font_manager._rebuild()
after reconstruction, to display the normal thickness of the Times New Roman font.