I simply cannot get a density plot for the following data set:
A single y Varibale and corresponding year
I have tried copying code and simply modifying and i simply can't get it to work.
I need to look like below:
I need the X -axis to be years and the y- axis to be in millions.
Any help would be greatly appreciated.
Code:
library(ggplot2)
library(ggthemes)
library(tidyverse)
ggplot(data = density, aes(x = welfare)) +
geom_density(fill = 'steelblue', color = 'black') +
theme_economist()

