How to plot data of a dictionarie with x
as key and y
as value?
data = {2007: 1, 2008: 2, 2009: 3}
keys = sorted(data)
values = [data[key] for key in keys]
plt.plot(values)
How to plot data of a dictionarie with x
as key and y
as value?
data = {2007: 1, 2008: 2, 2009: 3}
keys = sorted(data)
values = [data[key] for key in keys]
plt.plot(values)