1

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")
1
  • 1
    typo error : it is title(...) not tittle(..) Commented May 10, 2013 at 10:57

1 Answer 1

1

You need to create a figure before you can set its title:

figure()
title('frequency of words')
Sign up to request clarification or add additional context in comments.

2 Comments

So do I need to put clf() as well?
@Erika Hmm, I'm not sure now. 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.