import numpy as np import matplotlib.pyplot as plt # Data to be plotted: n = 10000 # Number of random values x = np.random.randn(n) # The random values num_bins = 20 # Number of bins # Size of figure window: plt.figure(num=1, figsize=(24/2.54, 18/2.54)) # Inches # Plotting the histogram: plt.hist(x, num_bins, color='green') plt.grid() # plt.savefig('histogram.pdf') plt.show()