jofaichow commited on
Commit
c8ff24e
1 Parent(s): 2ea45d7

tweaked boxplot

Browse files
Files changed (1) hide show
  1. app/app.R +4 -4
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
- d_ordered <- with(d_filter, reorder(model, tc_pct, median))
817
- d_filter$group <- factor(d_filter$model, levels = levels(d_ordered))
818
 
819
  # ggplot2
820
- p <- ggplot(d_filter, aes(x = group, y = tc_pct, group = group, color = group)) +
821
- geom_boxplot(fill = NA) +
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'),