SHARE
TWEET

Untitled

a guest Apr 25th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top