gapminder %>% ggplot(aes(x = year, y = gdpPercap )) geom_line() theme_bw()
CodePudding user response:
You probably want to use group = country
like this:
library(gapminder)
library(ggplot2)
library(dplyr)
gapminder %>%
ggplot(aes(x = year, y = gdpPercap, group = country))
geom_line()
theme_bw()
Created on 2022-09-29 with reprex v2.0.2