Created
January 18, 2015 21:37
-
-
Save pbiecek/5e8eccab86a54b527049 to your computer and use it in GitHub Desktop.
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
tab <- as.data.frame(table(studenci$CNT)) | |
names(tab) <- c('Kraje','N') | |
summary(tab$N) | |
tab$Kolor <- as.factor(ifelse(tab$Kraje=='Poland',1,2)) | |
ggplot(data = tab, | |
aes(x = reorder(Kraje,N), | |
y = N, | |
fill = Kolor)) + | |
geom_bar(stat='identity', | |
colour='black') + | |
theme_bw() + | |
theme(axis.text.x = element_text(angle=90,hjust=1,vjust=1,size=8), | |
legend.position='none') + | |
xlab('Kraje') + | |
ylab('Liczba wylosowanych studentów') + | |
scale_fill_manual(values = c('red','white'), | |
breaks = 1:2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment