Exercise: Reconstruct Gapminder graph
Reconstruct the following graph which shows the relationship between GDP per capita and life expectancy for the year 2007:
- Use the
ggplot()
function and specify thegapminder_2007
dataset as input - Add a
geom_point
layer to the plot and create a scatter plot showing the GDP per capitagdpPercap
on the x-axis and the life expectancylifeExp
on the y-axis - Make the
color
aesthetic of the points unique for eachcontinent
Results
Submit code to see output here.