Skip to content

Instantly share code, notes, and snippets.

@raffdoc
Forked from alstat/Iligan City Population.r
Created May 17, 2012 20:27
Show Gist options
  • Save raffdoc/2721403 to your computer and use it in GitHub Desktop.
Save raffdoc/2721403 to your computer and use it in GitHub Desktop.
library(ggplot2)
library(colorRamps)
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 2007")),
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment