8
import matplotlib.pyplot as plt

squares = [1,4,9,16,25]
plt.plot(squares,linewidth=5)

plt.title('Square Number',fontsize=24)
plt.xlable('Value',fontsize=14)
plt.ylable('Square of Value',fontsize=14)

plt.tick_params(axis='both',lablesize=14)
plt.show()

enter image description here

Is it because of the version of the problem?

2
  • 3
    xlable -> xlabel, ylable -> ylabel, lablesize -> labelsize Commented Jun 6, 2017 at 3:45
  • 8
    You probably just need to spell 'label' correctly. Commented Jun 6, 2017 at 3:46

1 Answer 1

31

You can try like this :

import matplotlib.pyplot as plt

squares = [1,4,9,16,25]
plt.plot(squares,linewidth=5)

plt.title('Square Number',fontsize=24)
plt.xlabel('Value',fontsize=14)
plt.ylabel('Square of Value',fontsize=14)

plt.tick_params(axis='both',labelsize=14)
plt.show()

your question is and should be changed to,

xlable -> xlabel,

ylable -> ylabel,

lablesize -> labelsize, spell the label right.

Sign up to request clarification or add additional context in comments.

Comments

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.