Created
October 5, 2012 16:51
-
-
Save brews/3840943 to your computer and use it in GitHub Desktop.
Plot summary for firehistory data in R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source("firehistory.R") | |
d <- read.fhx("17P.fhx") | |
# Make a copy of the data we read-in in case we fuck-up. | |
d.new <- d | |
# Reverse the level ordering for the type factor -- the plotting looks better. | |
d.new$rings$type <- factor(d$rings$type, levels = rev(levels(d$rings$type))) | |
# Plots with ggplot2 | |
p <- ggplot(d.new$rings, aes(x = year, fill = type)) | |
p + geom_bar() # And a plot should pop up with this command. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment