Thanks to visit codestin.com
Credit goes to github.com

Skip to content

histogram2d (Trac #1985) #2578

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
numpy-gitbot opened this issue Oct 19, 2012 · 1 comment
Closed

histogram2d (Trac #1985) #2578

numpy-gitbot opened this issue Oct 19, 2012 · 1 comment

Comments

@numpy-gitbot
Copy link

Original ticket http://projects.scipy.org/numpy/ticket/1985 on 2011-11-22 by trac user gsiisg, assigned to unknown.

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.

@numpy-gitbot
Copy link
Author

@samtygier wrote on 2012-01-11

duplicate of #2423
histogram2d and imshow do there coordinates differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant