[NumPy-Tickets] [NumPy] #1985: histogram2d
NumPy Trac
numpy-tickets@scipy....
Mon Nov 21 20:40:45 CST 2011
#1985: histogram2d
--------------------+-------------------------------------------------------
Reporter: gsiisg | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: Other | Version: 1.6.0
Keywords: |
--------------------+-------------------------------------------------------
I notice that when I plot two variables, the x and y axis are flipped
according to the online example, so I did a simple distribution of points
x=np.array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1])
y=np.array([ 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 100])
H, yedges, xedges = np.histogram2d(y,x)
extent = [xedges[0], xedges[-1], yedges[0], yedges[-1]]
pylab.imshow(H, extent=extent,
interpolation='nearest',origin='lower',aspect='auto')
I had to enter into histgram2d() the "y" before the "x" to get the graph
to come out as expected.
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1985>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list