Exercise: Titles and Axes

Practice with some lab exercises.

We'll cover the following

Exercise

Create a scatter plot that plots life expectancy (Life_exp) vs. GDP per capita (GDP/Capita). In doing so, ensure the following conditions are met:

  • The main title says Life Expectancy Against GDP Per Capita and is centered with the font family "Times New Roman" and size 46.

  • x-axis is titled 'GDP Per Capita', and x-axis is titled "Life Expectancy". Ensure the font family is "Times New Roman" and size 30 for both the 𝑥 and 𝑦-axis titles.

  • x and y ticks have font family "Times New Roman" and size 18.

  • x ticks have dollar signs as prefixes, while 𝑦 ticks have the suffix "years".

  • Include grid lines for the x-axis but not for the y-axis.

Get hands-on with 1400+ tech skills courses.