Skip to content

Instantly share code, notes, and snippets.

@pbiecek
Created January 18, 2015 21:41
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/329b8064f6e0dee0d073 to your computer and use it in GitHub Desktop.
Save pbiecek/329b8064f6e0dee0d073 to your computer and use it in GitHub Desktop.
### przedział ufności
alpha <- 0.05
z_alpha <- qnorm(1-alpha/2)
wynik$Kolor <- ifelse(wynik$CNT=='Poland','red','black')
### wykresy
ggplot(data = wynik,
aes(x=reorder(CNT,PV1MATH),
y=PV1MATH)) +
geom_errorbar(aes(ymin=PV1MATH-z_alpha*SE,
ymax=PV1MATH+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$Kolor[order(wynik$PV1MATH)]),
legend.position = 'none') +
xlab('Kraj') +
ylab('PV1MATH')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment