# -*- coding: utf-8 -*- """ Created on Tue Nov 5 19:13:38 2019 @author: Finn Haugen """ 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: fig_width_cm = 24 fig_height_cm = 18 plt.figure(num=1, figsize=(fig_width_cm/2.54, fig_height_cm/2.54)) # Generating the histogram: plt.hist(x, num_bins, color='green') plt.grid() #plt.show() plt.savefig('histogram.pdf')