import matplotlib.pyplot as plt

countries = [
    "Japan", "Switzerland", "Singapore", "Australia", "Spain",
    "Iceland", "Italy", "Israel", "Sweden", "France"
]
life_exp = [84.8, 84.4, 84.3, 83.9, 83.8, 83.6, 83.5, 83.4, 83.3, 83.1]

plt.figure(figsize=(10, 5))
plt.bar(countries, life_exp, color="steelblue")
plt.ylabel("Life expectancy (years)")
plt.title("Life expectancy by country (2024)")
plt.xticks(rotation=30, ha="right")
plt.tight_layout()
plt.savefig("test_plot.png", dpi=150)
