I’m trying to plot some data into a histogram using pyplot.hist as such:
hst = pp.figure()
pp.hist(spkSum)
hst.show()
spkSum contains the following data:[1, 1, 9, 9, 20, 20, 33, 33, 50, 50]
Ideally, I should have a vertical histogram whose bars sit neatly on the x-axis, reaching up to their respective values on the y-axis. Instead, I have this:

How can I fix this figure?
The axes aren’t switched. You gave
hista list of numbers, five distinct numbers repeated twice, and it computed a histogram appropriately. Maybe you’re looking for a bar plot?gives