报错:
raise AttributeError('Unknown property %s' % k)
AttributeError: Unknown property fontisize
改:
label错写成了lable
报错:
AttributeError: module 'matplotlib.pyplot' has no attribute 'xlable'
改:
可以试一下
lable后面的括号是不是英文的,然后run
报错:
raise AttributeError('Unknown property %s' % k)
AttributeError: Unknown property font
改:
添加
from matplotlib.font_manager import FontProperties
import matplotlib.pyplot as plt
font = FontProperties(fname=r"C:\\WINDOWS\\Fonts\\simsun.ttc", size=14)#C:\WINDOWS\Fonts
plt.xlabel("中文", fontproperties=font)