ERROR: 'str' object is not callable

import matplotlib.pyplot as plt
import as style
plt.plot([2, 4, 6], [10, 15, 5])

plt.plot([2, 4, 6], [10, 15, 5])

I thought that there is nothing wrong with this (I got exactly the same answer with the answer provided by DQ), but I kept getting the error:

TypeError                                 Traceback (most recent call last)
<ipython-input-1-5feb067047cc> in <module>
      1 import matplotlib.pyplot as plt
      2 import as style
----> 3 style.use('ggplot')
      4 plt.plot([2, 4, 6], [10, 15, 5])

TypeError: 'str' object is not callable

Can anyone help me please? Thank you.

1 Like

You must have done

style.use = 'ggplot'

instead of


Now you will have to restart and re-login or

reload matplotlib package