繁体   English   中英

如何在matplotlib(python)中为轴添加标题和标签?

[英]How to add a title and labels for the axis in matplotlib(python)?

我试图使它像这样,但是它说没有对象属性

import matplotlib
matplotlib.use('Svg')
from pylab import *
clf()
tittle("frequency of words")
xlabel("words")
ylabel("frequency")

您需要先创建一个图,然后才能设置其标题:

figure()
title('frequency of words')

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM