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

c++ - No viable overloaded operator for references a map -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - Gamma correction doesn't look properly corrected, is this linear? -