Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2. import numpy as np
  3.  
  4. plt(np.arange(10)) #NameError: name 'plot' is not defined
  5. plt.show()
  6.  
  7. fig = plt.figure()
  8.  
  9. ax1 = fig.add_subplot(2, 2, 1)
  10.  
  11. ax2 = fig.add_subplot(2, 2, 2)
  12.  
  13. ax3 = fig.add_subplot(2, 2, 3)
  14.  
  15. fig.show()
  16.  
  17. from numpy.random import randn
  18.  
  19. plt.plot(randn(50).cumsum(), 'k--') #AttributeError: 'Figure' object has no attribute 'plot'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement