Q: Plotting an array in python does not work Hi I am new to python and I want to plot some array but I have problems with reproducing this EXAMPLE. As soon as I run this code:
import matplotlib.pyplot as plt
plt.plot([1,2,3,4], [1,4,9,16], 'ro')
plt.axis([0, 6, 0, 20])
plt.show()

a bunch of errors come instead of a plot.
The errors say:

Could somebody let me know what is wrong?

A: It seems your python installation / matplotlib installation is incomplete. Your version of matplotlib uses tkinter, which is missing. Try uninstalling matplotlib, tkinter, and then reinstalling them both
pip uninstall matplotlib
pip install matplotlib

If this does not work either, as tkinter is a library that's bundled along with python by default and not on Python Packaging Index (pip), you will have to uninstall python, and then reinstall it

A: works for me in python 3.5.  
The error message says you're missing tkinter try 
pip install tkinter

