Population of Iligan City from 1970 to 2010

May 16, 2012
By

(This article was first published on Alstat R Blog, and kindly contributed to R-bloggers)

R Codes

library(ggplot2)
library(grDevices)

IliganCity <- c(104493, 118778, 167358, 226568, 273004, 285061, 308046, 322821)
CensalYear <- c("1970", "1975", "1980", "1990", "1995", "2000", "2007", "2010")

qplot(CensalYear, IliganCity, xlab = expression(bold("Censal Year")),
ylab = expression(bold("Population")), geom = "bar", colour = I("red"),
fill = IliganCity, stat = "identity", ylim = c(0, 370000)) + theme_bw() +
opts(
title = expression(bold("Iligan City Population from 1970 to 2010")),
plot.title = theme_text(size = 18, colour = "darkblue"),
panel.border = theme_rect(linetype = "dashed", colour = "red"),
legend.position = "none") + geom_text(aes(label = IliganCity, angle = 90,
hjust = -0.1), size = 4)

To leave a comment for the author, please follow the link and comment on his blog: Alstat R Blog.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.