import numpy as np import matplotlib.pyplot as plt x = np.random.uniform(-100, 100, 1000) plt.hist(x, bins=30, range=(-50, 50)) plt.show()