python - How to create a histogram of 2D arrays in ipython -


i have use random number generator create 1000*1000 2d arrays. how can create histogram of 2d arrays?

s1=np.random.rand(1000,1000) 

install , use matplotlib. code this:

import matplotlib.pyplot plt  s1=np.random.rand(1000,1000) plt.hist(s1) 

matplotlib gives ton of useful options, can read more them here.


Comments

Popular posts from this blog

java - Ebean enhancement ignores a model -

javascript - Reference error while trying to encapsulate an animation function -

SQL php on different pages to Insert (mysqli) -