Plotting a histogram of first two dimensions of 3D array
I do have a array of shape (100,500,400) where the first two dimensions are the row and the column of an image data and the third dimension is the channels of the image file. I want to plot the histogram for some specific rows and columns from the array, i.e. I want to plot the first 10 rows and 15 columns of the array. How can I do it using matplotlib?
The array looks something like this:
[[[5.4600e+02 6.3100e+02 6.9600e+02 ... 6.3500e+02 4.5300e+02 6.2800e+02]
[7.6100e+02 6.9200e+02 5.4200e+02 ... 3.8500e+02 2.4500e+02 3.9100e+02]
[3.7200e+02 3.4600e+02 3.2400e+02 ... 8.8000e+01 7.0000e+00 7.8000e+01]
...
[1.0690e+03 1.1660e+03 1.2240e+03 ... 开发者_如何转开发0.0000e+00 0.0000e+00 0.0000e+00]
[1.0310e+03 1.0670e+03 1.0170e+03 ... 0.0000e+00 0.0000e+00 0.0000e+00]
[9.5600e+02 1.0120e+03 1.0590e+03 ... 0.0000e+00 0.0000e+00 0.0000e+00]]
精彩评论