Reputation: 9109
I have the following code:
ax1.hist(true_time, bins=500, edgecolor="none")
ax2.hist(true_time_2, bins=500, edgecolor="none")
I expected that it would give me two hists with the same number of bins, but it wouldn't:
How to do it correctly?
Upvotes: 2
Views: 4075
Reputation: 367
The reason that you get different binning is that your two datasets are different. As a comment said, in the second plot you do have 500 bins.
My guess is that true_time has very sparsely distributed data.
Upvotes: 0
Reputation: 6004
If you have some distant outlier in true_time, it may be that the bins were made just really really big to include it.
Upvotes: 0