Skip to content

Instantly share code, notes, and snippets.

@alstat
Created May 17, 2012 02:43
Show Gist options
  • Save alstat/2715820 to your computer and use it in GitHub Desktop.
Save alstat/2715820 to your computer and use it in GitHub Desktop.
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment