1# credit to the Stack Overflow user in the source link
2
3import matplotlib.pylab as plt
4
5lists = sorted(d.items()) # sorted by key, return a list of tuples
6
7x, y = zip(*lists) # unpack a list of pairs into two tuples
8
9plt.plot(x, y)
10plt.show()