Skip to content

Instantly share code, notes, and snippets.

@pbiecek
Created January 18, 2015 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pbiecek/cbd19139026a6eabe254 to your computer and use it in GitHub Desktop.
Save pbiecek/cbd19139026a6eabe254 to your computer and use it in GitHub Desktop.
wynik_matematyka$Kolor <- ifelse(wynik_matematyka$CNT=='Poland','red','black')
OECD_mean <- mean(wynik_matematyka$PV)
### wykresy
ggplot(data = wynik_matematyka,
aes(x=reorder(CNT,PV),
y=PV)) +
geom_errorbar(aes(ymin=PV-z_alpha*SE,
ymax=PV+z_alpha*SE)) +
geom_point(colour='red') +
theme_bw() +
theme(axis.text.x = element_text(angle=90,
hjust=1,
vjust=1,
size = 8,
colour=wynik_matematyka$Kolor[order(wynik_matematyka$PV)]),
legend.position = 'none') +
geom_hline(aes(yintercept=OECD_mean)) +
xlab('Kraj') +
ylab('Umiejętości matematyczne')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment