]> code.communitydata.science - coldcallbot-discord.git/commitdiff
generate better imges
authorBenjamin Mako Hill <mako@atdot.cc>
Thu, 10 Feb 2022 02:57:09 +0000 (18:57 -0800)
committerBenjamin Mako Hill <mako@atdot.cc>
Sat, 28 Sep 2024 23:12:52 +0000 (16:12 -0700)
assessment_and_tracking/track_participation.R

index 4381b7859308756ce4440c206cd637d7bdd37661..37898e70b6ebae1affb0a676a43049f9687ee788 100644 (file)
@@ -96,7 +96,7 @@ color.gradient <- scales::seq_gradient_pal("yellow", "magenta", "Lab")(seq(0,1,l
 
 table(d$num.calls, d$absences)
 
 
 table(d$num.calls, d$absences)
 
-## png("questions_absence_histogram_combined.png", units="px", width=600, height=400)
+png("questions_absence_histogram_combined.png", units="px", width=600, height=400)
 
 ggplot(d) +
     aes(x=as.factor(num.calls), fill=as.factor(absences)) +
 
 ggplot(d) +
     aes(x=as.factor(num.calls), fill=as.factor(absences)) +
@@ -108,7 +108,7 @@ ggplot(d) +
     scale_fill_manual("Absences", values=color.gradient) +
     theme_bw()
 
     scale_fill_manual("Absences", values=color.gradient) +
     theme_bw()
 
-## dev.off()
+dev.off()
 
 absence.labeller <- function (df) {
     lapply(df, function (x) { paste("Absences:", x) })
 
 absence.labeller <- function (df) {
     lapply(df, function (x) { paste("Absences:", x) })
@@ -116,12 +116,12 @@ absence.labeller <- function (df) {
 
 ## png("questions_absence_histogram_facets.png", units="px", width=600, height=400)
 
 
 ## png("questions_absence_histogram_facets.png", units="px", width=600, height=400)
 
-ggplot(d) +
-    aes(x=as.factor(num.calls)) +
-    geom_bar() +
-    stat_count() +
-    scale_x_discrete("Number of questions answered") +
-    scale_y_continuous("Number of students") +
-    theme_bw() +
-    facet_wrap(.~absences, ncol=5, labeller="absence.labeller")
+## ggplot(d) +
+##     aes(x=as.factor(num.calls)) +
+##     geom_bar() +
+##     stat_count() +
+##     scale_x_discrete("Number of questions answered") +
+##     scale_y_continuous("Number of students") +
+##     theme_bw() +
+##     facet_wrap(.~absences, ncol=5, labeller="absence.labeller")
 
 

Community Data Science Collective || Want to submit a patch?