Preview:
import matplotlib.pyplot as plt

Country = ['USA','Japan','Germany','UK','France','Turkey','Mexico','Italy','Canada','Spain']
GDPgrowth = [0.547,-1.83,-2.98,-5.79,1.54,7.67,-2.77,-0.622,0.268,-4.21]

plt.figure(figsize=(10,5))
plt.bar(Country, GDPgrowth)
plt.xticks(rotation=0)
plt.xlabel("Country")
plt.ylabel("GDP growth (%)")
plt.title("GDP Change of the 10 Wealthiest OECD countries in Q1 2021 Relative to Q1 2020 ")
def addlabels(x,y):
    for i in range(len(x)):
        plt.text(i, y[i], y[i], ha = 'center')
addlabels(Country, GDPgrowth)
plt.savefig('GDPchange.png', dpi=300, bbox_inches='tight')
plt.show()

#reference for bar chart:https://datatofish.com/bar-chart-python-matplotlib/
#reference for axis labels: https://www.kite.com/python/docs/matplotlib.pyplot.xlabel
#reference for making the figure size bigger: https://www.pythonpool.com/matplotlib-figsize/
#reference for saving as an image: https://problemsolvingwithpython.com/06-Plotting-with-Matplotlib/06.04-Saving-Plots/
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter