Skip to content

Commit

Permalink
Merge branch 'main' of github.com:bcbio/bcbioR into main
Browse files Browse the repository at this point in the history
update templates with cbfriendly plots
  • Loading branch information
abartlett004 committed Apr 23, 2024
2 parents c6b6075 + e1561bc commit 46a0e6f
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export(bcbio_set_project)
export(bcbio_start_project)
export(cb_friendly_cols)
export(cb_friendly_pal)
export(list_cb_friendly_cols)
export(scale_color_cb_friendly)
export(scale_fill_cb_friendly)
import(ggplot2)
Expand Down
12 changes: 10 additions & 2 deletions R/cb_friendly.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,16 @@ cb_friendly_colors <- c(
`black` = "black",
`dark_grey` = "darkgrey",
`light_blue` = "lightblue",
`brown` = "#661100"
`brown` = "#661100",
`white` = "white"
)

#' list cb friendly colors
#' @export
list_cb_friendly_cols <- function(){
return(cb_friendly_colors)
}

#' fetch color from list by name
#' @export
cb_friendly_cols <- function(...) {
Expand All @@ -38,7 +45,8 @@ cb_friendly_palettes <- list(
"brown"),
`cool` = cb_friendly_cols("blue", "dark_purple", "purple", "sky_blue"),
`hot` = cb_friendly_cols("yellow", "light_orange", "dark_orange"),
`grey` = cb_friendly_cols("black", "dark_grey", "blue_grey")
`grey` = cb_friendly_cols("black", "dark_grey", "blue_grey"),
`heatmap` = cb_friendly_cols("blue", "white", "brown")
)

#' access cb friendly palette by name, reversing if necessary
Expand Down
2 changes: 1 addition & 1 deletion man/cb_friendly_colors.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/cb_friendly_palettes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions man/list_cb_friendly_cols.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 46a0e6f

Please sign in to comment.