First explain the error phenomenon:
My drawing command is:
plt.title('类别' + class_name+'的各项分割精度指标')
The Chinese characters in the drawing results are not displayed
Analyze the reasons
This is caused by not specifying Chinese fonts
solution:
Add the following to the header of the corresponding python file:
import matplotlib
import matplotlib.pyplot as plt
matplotlib.rc("font",family='SimHei') # 中文字体