From 120d33b7210ad80b8df317583675787d94c3a1b9 Mon Sep 17 00:00:00 2001 From: Stef van Buuren Date: Wed, 2 Dec 2020 09:18:06 +0100 Subject: [PATCH] Set transparency in data area; repair grouping problem using ungroup(): https://github.com/hafen/trelliscopejs/issues/102 --- R/p-a-equate-1339.R | 6 ++++++ R/p-d-equate-1339.R | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/R/p-a-equate-1339.R b/R/p-a-equate-1339.R index c1636bd..594da56 100644 --- a/R/p-a-equate-1339.R +++ b/R/p-a-equate-1339.R @@ -6,6 +6,11 @@ library("tidyr") library("gtools") theme_set(theme_light()) +theme_update(panel.background = element_rect(fill = "transparent", colour = NA), + plot.background = element_rect(fill = "transparent", colour = NA), + legend.key = element_blank(), + rect = element_rect(fill = "transparent") # all rectangles +) m_184 <- load_model("1339_184", model_dir = "models_2020", project = "Jamaica") d_184 <- load_data("1339_184", model_dir = "models_2020", project = "Jamaica") @@ -43,6 +48,7 @@ by_equate <- by_equate[sapply(by_equate$panel, is.list), ] # create the app by_equate %>% + ungroup() %>% trelliscope(name = "Percent pass by age for all equate groups", height = 500, width = 1000, diff --git a/R/p-d-equate-1339.R b/R/p-d-equate-1339.R index 80bdd7a..abb7237 100644 --- a/R/p-d-equate-1339.R +++ b/R/p-d-equate-1339.R @@ -8,6 +8,11 @@ library("tidyr") library("gtools") theme_set(theme_light()) +theme_update(panel.background = element_rect(fill = "transparent", colour = NA), + plot.background = element_rect(fill = "transparent", colour = NA), + legend.key = element_blank(), + rect = element_rect(fill = "transparent") # all rectangles +) m_000 <- load_model("1339_0", model_dir = "models_2020", project = "Jamaica") m_011 <- load_model("1339_11", model_dir = "models_2020", project = "Jamaica") @@ -98,6 +103,7 @@ by_equate <- by_equate[keep, ] # create the app by_equate %>% + ungroup() %>% trelliscope(name = "Percent pass by D-score, four models", height = 500, width = 1000,