I'm completely new to matplotlib, and I wanted to create a simple histogram of a fly's various positions within a test chamber. I seem to have done this, but for some reason the center of the histogram has condensed orange bars. I'm not sure why this is happening. (Btw I know I'm using lists instead of np arrays, but changing this doesn't remedy the error). Sorry if this is really simple, but I can't seem to find anything online adressing it.
import matplotlib.pyplot as plt
import _pickle as pickle
import numpy as np
def loadFile(pname):
with open(pname, 'r+b') as file:
pos = pickle.load(file)
return pos
#specifies which fly out of the many tracked
fly = 2
pos = loadFile('/Users/JKTechnical/Codes/FlyWork/posTester.vD')
#transpose the list into x and y values
t_pos = list(zip(*pos[fly]))
x = t_pos[0]
y = t_pos[1]
fig, axs = plt.subplots(1,1)
axs.hist(x, bins=20)
axs.hist(y, bins=20)
plt.show()
Here's what I get: