diff --git a/code/02_descriptives.R b/code/02_descriptives.R index 7e7a08e..677e5b1 100644 --- a/code/02_descriptives.R +++ b/code/02_descriptives.R @@ -308,16 +308,9 @@ addmargins(tab) proportions(tab, margin = "item") proportions(tab, margin = "event") -cc <- palette.colors(palette = "Okabe-Ito")[c(3,2,4,8)] - -pdf("figures/event-dist.pdf", height = 3.375, width = 12, pointsize = 10) -par(mai = c(.4,.4,.1,.1), mgp = c(2.4, 1, 0)) - -barplot(t(proportions(tab, margin = "item")), las = 2, col = c("#78004B", "#3CB4DC", "#91C86E", "#FF6900"), +barplot(t(proportions(tab, margin = "item")), las = 2, col = c("#3CB4DC", "#91C86E", "#FF6900", "#78004B"), legend.text = levels(datlogs$event), args.legend = list(x = "bottomleft", bg = "white")) -dev.off() - #lattice::barchart(proportions(tab, margin = "item"), las = 2) # Proportion of events