我试图使它像这样,但它说没有对象属性标题
import matplotlib
matplotlib.use('Svg')
from pylab import *
clf()
tittle("frequency of words")
xlabel("words")
ylabel("frequency")
最佳答案
您需要先创建一个图形,然后才能设置其标题:
figure()
title('frequency of words')
关于python - 如何在 matplotlib(python) 中为轴添加标题和标签?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16480701/