Skip to content

Instantly share code, notes, and snippets.

@illy
Created March 30, 2013 23:28
Show Gist options
  • Save illy/5278808 to your computer and use it in GitHub Desktop.
Save illy/5278808 to your computer and use it in GitHub Desktop.
sample <- read.table("~/Dropbox/sample.txt", header=T, sep="\t")
sample$Type <- factor(sample$Type, levels = c("NSR", "stock-related", "NTR", "ticker-related", "NEG", "NEU", "POS"))
p <- ggplot(sample)
p <- p + geom_boxplot(aes(x=factor(Type), y=Word, fill=factor(Type)), notch=T, outlier.shape = NA) +
theme(axis.text.x=element_text(angle=15, hjust=0.8, vjust=1, size=12),
axis.text.y=element_text(size=12)) +
guides(fill=F) +
scale_fill_manual(values=c("skyblue1", "skyblue1", "grey60", "grey60", "grey60", "grey60", "grey60" ), guide=FALSE) +
scale_y_continuous(limits = c(0, 30))
print(p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment