What is wrong with my histogram?
<pre><code>import matplotlib.pyplot as plt
import numpy as np 
import xlrd
import xlwt

wb = xlrd.open_workbook('Scatter plot.xlsx')
sh1 = wb.sheet_by_name('T180')
sh2=wb.sheet_by_name("T181")
sh3=wb.sheet_by_name("Sheet1")

x= np.array([sh1.col_values(7, start_rowx=50, end_rowx=315)])
x1= np.array([sh2.col_values(1, start_rowx=48, end_rowx=299)])

y=np.array([sh1.col_values(2, start_rowx=50, end_rowx=299)])
y1= np.array([sh2.col_values(2, start_rowx=48, end_rowx=299)])

print x

plt.hist(x,bins=50)
plt.xlabel("dx (micron)")
plt.ylabel("dy (micron)")
plt.show()
</code></pre>

<p>As you can see the figure from link is obtained by this code. Why this histogram is like this?</p>

<p><a href="http://i.stack.imgur.com/EmvTR.jpg" rel="nofollow"><img src="http://i.stack.imgur.com/EmvTR.jpg" alt="enter image description here"></a></p>

<p>How can I solve it? Thanks in advance for your kind help.</p>

<p>The shape of <code>x</code> is <code>(1, 265)</code>, it's a 2-dim array, you need to convert it to 1-dim array first:</p>

<pre><code>plt.hist(x.ravel(), bins=50)
</code></pre>

python arrays numpy histogram