Commit b41e79aa authored by Simon Pintarelli's avatar Simon Pintarelli

bugfix for previous commit (9759be49)

Parmeter limits in scale_x_continuous may discard the first and last bar!
parent 9759be49
......@@ -164,12 +164,14 @@ write.csv(data.frame(Number=grades$legi, Grade=grades$grade, Points=grades$point
\label{sec:grades}
<<grades, echo=FALSE, warning=FALSE, error=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, alpha=0.8) +
scale_x_continuous(breaks=seq(1,6, by=1), limits=c(1,6)) +
geom_histogram(binwidth = dg, alpha=0.8) +
scale_x_continuous(breaks=seq(1,6, by=1)) +
coord_cartesian(xlim=c(1,6)) +
ylab("Num. Stud")
ggplot(grades, aes(x=grade)) +
stat_ecdf() +
scale_x_continuous(breaks=seq(1,6, by=1), limits=c(1,6)) +
scale_x_continuous(breaks=seq(1,6, by=1)) +
coord_cartesian(xlim=c(1,6)) +
ylab("Percentage")
@ %def
......
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