You've decided to plot the number of countries in Europe and Asia that you've visited from 2018 to 2021. You want to get a graph like this:
Here's your code:
years = range(2018, 2022)
europe = [8, 9, 3, 1]
asia = [3, 2, 0, 0]
plt.stackplot(europe, asia, years, labels=["European countries", "Asian countries"])
plt.title("Countries visited per year")
plt.xlabel("Years")
plt.ylabel("Number of countries")
plt.xticks(years)
plt.yticks(range(0, 16, 5))
Which mistakes do you need to correct to get the graph above?