bins
Matplotlib histogram with collection bin for high values
Numpy has a handy function for dealing with this: np.clip. Despite what the name may sound like, it doesn’t remove values, it just limits them to the range you specify. Basically, it does Artem’s “dirty hack” inline. You can leave the values as they are, but in the hist call, just wrap the array in … Read more