Skip to content

Commit

Permalink
Adjust plot_bar_summary title
Browse files Browse the repository at this point in the history
  • Loading branch information
bschilder committed Jan 27, 2024
1 parent 07848ab commit 0e85ee5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/plot_bar_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,12 @@ plot_bar_summary <- function(results = load_example_results(),
## plotly doesn't inherit subtitle arg from ggplot,
## so need to append it to the title.
subtitle <- paste0(
if(!is.null(keywords)){shQuote(paste(keywords,collapse = ", "))},
if(!is.null(keywords)){
paste0("keywords: ",shQuote(paste(keywords,collapse = ", ")),";")
},
" ",formatC(length(unique(phenos[[count_var]])),big.mark = ","),
" ",tolower(count_var),"(s)")
" ",tolower(count_var),"(s)"
)
n_count_var <- paste("n",paste0(tolower(count_var),"s"),sep="_")
#### Sort celltypes by counts ####
data.table::setorderv(counts_df, n_count_var, -1L)
Expand Down

0 comments on commit 0e85ee5

Please sign in to comment.