In [28]:
from matplotlib import pyplot as plt
import numpy as np
values = np.random.binomial(1000, 0.5, 1000)
In [29]:
plt.hist(values, bins=20) # Generate some annoying noise before the chart
Out[29]:
In [30]:
_ = plt.hist(values, bins=20) # Remove noise (option 1)
In [31]:
plt.hist(values, bins=20)
None # Remove noise (option 2)