Spaces:
Running
Running
tweaked boxplot
Browse files
app/app.R
CHANGED
@@ -813,12 +813,12 @@ server <- function(input, output) {
|
|
813 |
d_filter <- react_d_filter()
|
814 |
|
815 |
# Order by TC_PCT
|
816 |
-
|
817 |
-
d_filter$
|
818 |
|
819 |
# ggplot2
|
820 |
-
p <- ggplot(d_filter, aes(x =
|
821 |
-
geom_boxplot(
|
822 |
theme(
|
823 |
panel.border = element_blank(),
|
824 |
panel.background = element_rect(fill = 'transparent'),
|
|
|
813 |
d_filter <- react_d_filter()
|
814 |
|
815 |
# Order by TC_PCT
|
816 |
+
d_model_order <- with(d_filter, reorder(model, tc_pct, median))
|
817 |
+
d_filter$model_order <- factor(d_filter$model, levels = levels(d_model_order))
|
818 |
|
819 |
# ggplot2
|
820 |
+
p <- ggplot(d_filter, aes(x = model_order, y = tc_pct, group = model_order, color = model_order)) +
|
821 |
+
geom_boxplot() +
|
822 |
theme(
|
823 |
panel.border = element_blank(),
|
824 |
panel.background = element_rect(fill = 'transparent'),
|