Bhawna G. Panwar

1 minute read

# Load data
population <- read.csv("C:/Users/Bhawna/Documents/blog/data/world-population.csv", sep=",", header=TRUE)

# Default plot
plot(population$Year, population$Population, type="l")

# Adjust axis
plot(population$Year, population$Population, type="l", ylim=c(0, 7000000000), xlab="Year", ylab="Population")

Reference: world_population.csv was obtained from Flowdata.com

comments powered by Disqus