if bins is None:
        bins = int(np.ceil(4 * np.sqrt(np.sqrt(len(x)))))