Commit 24bca575 authored by Simon Pintarelli's avatar Simon Pintarelli

change to numphys exam / update plots

parent 6f2b9c31
......@@ -17,8 +17,8 @@
>>>>>>> variant B
======= end
\pagestyle{fancy}
<<<<<<< variant A
\chead{Komplexe Analysis FS16}
<<<<<<< HEAD
\chead{Numerische Methoden PHYS FS16}
\lhead{DMATH ETHZ}
\rhead{Prof. Muster}
>>>>>>> variant B
......@@ -132,12 +132,12 @@ scale_plot <- rbind(scale_plot, cbind(scale, col=rep("rounded", nrow(linscale)))
\section*{Grades}
\label{sec:grades}
<<grades, echo=FALSE, warning=TRUE, fig.width=5, fig.height=5, out.width="0.49\\linewidth", fig.show='hold', fig.env="figure*", fig.subcap=c("Histogram", "CDF"), fig.pos='h!'>>=
ggplot(grades, aes(x=grade)) + geom_histogram(binwidth = 0.25) + scale_x_continuous(breaks=seq(1,6, by=1)) + ylab("Num. Stud")
ggplot(grades, aes(x=grade)) + geom_histogram(binwidth = 0.25, alpha=0.8) + scale_x_continuous(breaks=seq(1,6, by=1)) + ylab("Num. Stud")
ggplot(grades, aes(x=grade)) + stat_ecdf() + scale_x_continuous(breaks=seq(1,6, by=1)) + ylab("Percentage")
@ %def
<<violing, echo=FALSE, fig.height=1, fig.width=3, fig.show='hold'>>=
ogrades <- cbind.data.frame(x=rep("grade", nrow(grades)), y=grades$grade)
opoints <- cbind.data.frame(x=rep("points", nrow(grades)), y=grades$points)
......@@ -149,7 +149,7 @@ ggplot(opoints, aes(x=x,y=y)) + geom_violin() + geom_boxplot(width=.1, fill="bla
<<grading_scale_plot, opts.label="codefig", echo=FALSE, results='asis', cache=FALSE, fig.width=5, fig.height=5>>=
I <- match(seq(1, 6, by=dp), scale$grade)
I <- match(seq(1, 6, by=dg), scale$grade)
plot1 <- ggplot(scale_plot, aes(x=s, y=grade, col=col)) + geom_line() + scale_y_continuous(breaks=seq(1,6,by=0.5)) +
scale_x_continuous(breaks=seq(0, maxpoints, by=ceiling(maxpoints/10))) + xlab("points") + theme(legend.position="bottom")
plot1 + theme(legend.title=element_blank())
......@@ -159,9 +159,11 @@ print(xtable(data.frame(Grade=scale$grade[I], Points=scale$s[I])), include.rowna
<<out1, echo=FALSE>>=
ncand <- nrow(grades)
passed <- sum(grades$grade>=4)
ppassed <- round(100*passed/ncand, 1)
@
\vspace{0.5cm}
{\Large \Sexpr{ passed } of \Sexpr{ncand} candidates have passed.}
{\Large \Sexpr{ passed } of \Sexpr{ncand} (\Sexpr{ ppassed} \%) candidates have passed.}
\pagebreak
\FloatBarrier
......@@ -170,13 +172,13 @@ passed <- sum(grades$grade>=4)
<<out,echo=FALSE,warning=FALSE, fig.width=5, fig.height=5, out.width="0.49\\linewidth",fig.cap="Point distribution (per task)",fig.show='hold',fig.subcap=c("Histogram","CDF"), fig.env="figure*", fig.pos='h!'>>=
ggplot(dset, aes(x=value)) + geom_histogram(binwidth=1) + facet_wrap(~variable, scales="free") + ylab("Num. Stud.") + xlab("Points")
ggplot(dset, aes(x=value)) + geom_histogram(binwidth=1, alpha=0.8) + facet_wrap(~variable, scales="free") + ylab("Num. Stud.") + xlab("Points")
ggplot(dset, aes(x=value)) + stat_ecdf() + facet_wrap(~variable, scales="free") + xlab("Points") + ylab("Percentage")
@ %def
<<total, echo=FALSE, warning=FALSE, fig.width=5, fig.height=5, out.width="0.49\\linewidth", fig.cap="Point distribution (total)", fig.show='hold', fig.subcap=c("Histogram", "CDF"), fig.env='figure*', fig.pos='h!'>>=
ggplot(total_points, aes(x=s)) + geom_histogram(binwidth=2) + ylab("Num. stud.") + xlab("Total points") + xlim(0, maxpoints)
ggplot(total_points, aes(x=s)) + geom_histogram(binwidth=2, alpha=0.8) + ylab("Num. stud.") + xlab("Total points") + xlim(0, maxpoints)
ggplot(total_points, aes(x=s)) + stat_ecdf() + xlim(0, maxpoints) + xlab("Total points")
@ %def
......@@ -185,16 +187,5 @@ ggplot(total_points, aes(x=s)) + stat_ecdf() + xlim(0, maxpoints) + xlab("Total
@ %def
<<edoz_output, include=FALSE, echo=FALSE, warning=FALSE>>=
edoz <- read.csv('edoz.txt', encoding='ISO-8859-1', sep='\t')
colnames(edoz) <- c("Id", "Last Name", "First Name", "Nummer",
"Administration Office", "Direction", "Rep",
"Grade", "Grade Trend", "dropout", "checksum")
out <- inner_join(edoz, data.frame(Nummer=grades$Nummer, grade=grades$grade))
out$Grade <- out$grade
out <- select(out, -c("grade"))
write.csv(out, file="edoz-grades.txt", quote=FALSE, sep="\t", fileEncoding="ISO-8859-1", na="", row.names=FALSE)
@
\end{document}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment