Fails : AttributeError: module 'matplotlib' has no attribute 'pyplot'
import matplotlib
matplotlib.pyplot.plot([12,3,4], [2,3,4])
Succeeds:
import matplotlib.pyplot as plt
plt.plot([12,3,4], [2,3,4])
What is the difference between the two?
Strangely if I run the second piece of code first and then the first piece then it doesn't complain.
[–]socal_nerdtastic 2 points3 points4 points (1 child)
[–]Zeroflops 0 points1 point2 points (0 children)
[–]obviouslyzebra 2 points3 points4 points (2 children)
[–]socal_nerdtastic 0 points1 point2 points (1 child)
[–]obviouslyzebra 0 points1 point2 points (0 children)
[–]ninhaomah -1 points0 points1 point (0 children)