I m a student and I m in a huge trouble, I am trying to visualize a plot of 2 variables x and y the number of data points in x and y are like 100 thousand or similar and the data in is float and almost with 3 decimal placesfoe eg 0.002 or 12.003.
When i try to plot it using plt.hist i get weird lines in my plot when i give it different bins sometimes some bins work perfect. I have attached the image of plot and code below pls help. Like this one is perfect One line appears here
and so on.. it just happens when i increase binning number in my code like bins =[46,46] and bins =[47,47] and so on and then there will be a specific bin number where it would appear okayish and perfect i dont know why this is happening
plt.hist2d(df3.Yaxis, df3.YError,bins =[45,45])
plt.colorbar()
plt.title("EMF OFF X- axis")
plt.xlabel("mm")
plt.show()
Pls help me explain this
I tried many other libraries in python all have the same problem while plotting. I tried to do the same stuff in matlab and it works flawlessly but pls make me understand why python is like this