matplotlib has no attribute 'pyplot' - ExceptionsHub
exceptionshub.com › matplotlib-has-no-attributeApr 04, 2018 · Questions: I can import matplotlib but when I try to run the following: matplotlib.pyplot(x) I get: Traceback (most recent call last): File "<pyshell#31>", line 1, in <module> matplotlib.pyplot(x) AttributeError: 'module' object has no attribute 'pyplot' Answers: pyplot is a sub-module of matplotlib which doesn’t get imported with a simple import matplotlib. >>> import matplotlib >>> ...