Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2. import numpy as np
  3. import random
  4. import matplotlib as mpl
  5.  
  6. matrix = []
  7.  
  8. for j in range(0,1000): #number of elements in final matrix
  9. s = 0
  10. for i in range(0,1000): # summirise 1000 numbers
  11. s = s + (random.randint(0,10)/10)
  12. matrix.append(round(s))
  13.  
  14. #print(matrix)
  15.  
  16.  
  17. fig = plt.figure()
  18. plt.hist(matrix)
  19. plt.title('Simple histogramm')
  20. plt.grid(True)
  21.  
  22. plt.axis([0, 1000, 0 , 300])
  23.  
  24.  
  25.  
  26. plt.title('OpenStreetMap Point Types')
  27.  
  28. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement