This is a demonstration showing how to make your first plot using R, Rstudio, and ggplot.
Steps:
tidyverse and
gapminder libraries (and that they are installed on your
computer).gapminder and a mapping
between data and aesthetic features. For example put GDP per capita on
the x axis and life expectancy on the y axis.geom_pointRefine your plot:
labs and the arguments
x, y, title,
subtitle, caption, tag (some of
these are optional and not always needed.)theme to make the text bigger by setting the
size property of text with the
element_text function.scale_x_log10Repeat:
mtcars or
palmerpenguins.Refer to the slides for this lesson for more ideas and examples.