From 37ed5d3d856193037a1d9893e6fba07cc2f57178 Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Thu, 2 Sep 2021 14:55:31 -0400 Subject: [PATCH] Add additional viridis pal support --- R/methods.R | 3 +++ R/plotting.R | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/R/methods.R b/R/methods.R index 818c3a4..0ac3ff4 100644 --- a/R/methods.R +++ b/R/methods.R @@ -34,6 +34,9 @@ #' \item \code{cividis} #' \item \code{inferno} #' \item \code{plasma} +#' \item \code{mako} +#' \item \code{rocket} +#' \item \code{turbo} #' } #' @return A scatterplot from a given reduction showing the gene-weighted #' density diff --git a/R/plotting.R b/R/plotting.R index 21a6754..6d00cca 100644 --- a/R/plotting.R +++ b/R/plotting.R @@ -17,7 +17,8 @@ plot_density_ <- function(z, feature, cell_embeddings, dim_names, shape, size, legend_title, pal = c( "viridis", "magma", "cividis", - "inferno", "plasma" + "inferno", "plasma", "mako", + "rocket","turbo" ), ...) { p <- ggplot(data.frame(cell_embeddings, feature = z)) + aes_string(dim_names[1], dim_names[2], color = "feature") + @@ -37,5 +38,5 @@ plot_density_ <- function(z, feature, cell_embeddings, dim_names, shape, size, pal <- match.arg(pal) p + scale_color_viridis_c(option = pal, ...) - + }