When I use a Python shell this works fine, but when I use a Python file and run the file, I get an error on Line:
import matplotlib.pyplot as plt