1import matplotlib.pyplot as plt
2%matplotlib inline
3plt.style.use('ggplot')
4
5x = ['Nuclear', 'Hydro', 'Gas', 'Oil', 'Coal', 'Biofuel']
6energy = [5, 6, 15, 22, 24, 8]
7
8x_pos = [i for i, _ in enumerate(x)]
9
10plt.bar(x_pos, energy, color='green')
11plt.xlabel("Energy Source")
12plt.ylabel("Energy Output (GJ)")
13plt.title("Energy output from various fuel sources")
14
15plt.xticks(x_pos, x)
16
17plt.show()
18