I have two lists -
years = ['2010', '2011', '2012', '2013', '2014', '2015', '2016', '2017', '2018', '2019', '2020']
profits = ['362', '622', '-409', '-92', '-148', '-130', '-128', '98', '-74', '35', '-419']
How can I plot this list, and in which chart should I use here?
I tried this code but output is not right -
from matplotlib import pyplot as plt
# Figure Size
fig = plt.figure(figsize =(10, 7))
# Horizontal Bar Plot
plt.bar(years, profits)
# Show Plot
plt.show()
Wrong output which I'm getting: