Skip to content

Instantly share code, notes, and snippets.

@gfrmin
Created October 3, 2013 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gfrmin/6813192 to your computer and use it in GitHub Desktop.
Save gfrmin/6813192 to your computer and use it in GitHub Desktop.
library(reshape2)
library(ggplot2)
library(data.table)
library(scales)
infmor <- read.csv("2.csv")
infmor <- melt(infmor, id.vars = "year")
infmorplot <- ggplot() + geom_line(data = infmor, mapping = aes(x = year, y = value, colour = variable, group = variable)) + labs(x = "Year", y = "Infant mortality per 1000 births") + scale_x_continuous(limits = c(1950, 2020)) + theme_bw()
ggsave(filename = "popplot.png", plot = popplot)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment