I have tried to make it like this, but it says no object attribute to tittle
import matplotlib
matplotlib.use('Svg')
from pylab import *
clf()
tittle("frequency of words")
xlabel("words")
ylabel("frequency")
I have tried to make it like this, but it says no object attribute to tittle
import matplotlib
matplotlib.use('Svg')
from pylab import *
clf()
tittle("frequency of words")
xlabel("words")
ylabel("frequency")
You need to create a figure before you can set its title:
figure()
title('frequency of words')
clf clears the current figure, but if I run it before creating a figure, it creates one. So your code actually works for me (apart from the typo). But you can try putting figure() instead of clf() just in case