FredHutch / VISCtemplates

Tools for writing reproducible reports at VISC
Other
4 stars 2 forks source link

Specify default colors and shapes for figures #155

Open kelliemac opened 1 month ago

kelliemac commented 1 month ago

Currently, the group_colors.R file (which sets up group-colors.R in the docs/ folder in a project repo) does not specify defaults commonly used across VISC reports, such as gray triangles for non-responders.

The current template is:

## Group colors for {{ study_name }}

group_colors <- c(
  `Group 1` = "[HEX#]",
  `Group 2` = "[HEX#]",
  `Group 3` = "[HEX#]",
  `Group 4` = "[HEX#]"
)

# To source these group colors in your Rmarkdown report:
#  source("R/group-colors.R")

# In ggplot2, you can set colors manually with:
#  scale_color_manual(values = group_colors)

I think we should fill in some of these hex codes, with the default gray used for non-responders, the default color for a placebo/control group, and a couple of other default colorblind-friendly colors.

I also think we should update this to specify default shapes as well (baseline vs. non-responder vs. positive responder).

For example (using colors and shapes from G002 B-cell report):

group_colors <- c(
  `Group 1` = "#E377C2",
  `Group 2` = "#2078B4",
  `Group 3` = "#EF8636"
)

nonresponder_color <- "#8F8F8F"

shape_map <- c("Baseline" = 5, 
               "Baseline (Upper Limit)" = 0,
               "No Detectable Response" = 2,
               "Detectable Response" = 19)
kelliemac commented 1 month ago

@asatofh and @mayerbry what do you think? any opinions on better choices for default colors/shapes that would better align with existing standards?

kelliemac commented 1 month ago

Consider using C101 colors (if 3 sufficient), or HVTN report colors. Maybe include light/dark shades for low/high dose option.

kelliemac commented 1 month ago

Default set should include maybe 8 colors? Make sure to get signoff from Ollivier and Solmaz. Could consider using the Ho study as an example.