From 1216dd2068b0badf6824a628dab9352569810755 Mon Sep 17 00:00:00 2001 From: George Chen <72078254+jiajic@users.noreply.github.com> Date: Fri, 4 Oct 2024 09:49:24 -0400 Subject: [PATCH] chore: update naming to avoid overlapping --- NAMESPACE | 2 +- R/gg_settings.R | 8 ++++---- R/plot_dotplot.R | 7 ++++--- man/dotPlot.Rd | 3 ++- man/{theme_dark.Rd => ggplot_themes.Rd} | 11 ++++++----- 5 files changed, 17 insertions(+), 14 deletions(-) rename man/{theme_dark.Rd => ggplot_themes.Rd} (57%) diff --git a/NAMESPACE b/NAMESPACE index ce3ea9a..1a87f04 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -93,7 +93,7 @@ export(spatPlot) export(spatPlot2D) export(spatPlot3D) export(subsetSankeySet) -export(theme_dark) +export(theme_dark2) export(violinPlot) exportClasses(giottoSankeyPlan) exportMethods("+") diff --git a/R/gg_settings.R b/R/gg_settings.R index d1d2573..20eba2d 100644 --- a/R/gg_settings.R +++ b/R/gg_settings.R @@ -31,12 +31,12 @@ } -#' @name theme_dark -#' @title Dark plotting theme +#' @name ggplot_themes +#' @title ggplot2 plotting themes #' @description -#' A default dark theme. It can be applied through the `theme_param` +#' ggplot2 themes. It can be applied through the `theme_param` arg. #' @export -theme_dark <- theme( +theme_dark2 <- theme( plot.background = element_rect(fill = "black"), panel.background = element_rect(fill = "black"), panel.grid.major = element_blank(), diff --git a/R/plot_dotplot.R b/R/plot_dotplot.R index 61eacc4..147d0e3 100644 --- a/R/plot_dotplot.R +++ b/R/plot_dotplot.R @@ -51,7 +51,8 @@ #' cluster_column = "leiden_clus", #' feats = feats, #' dot_size = mean, -#' dot_color = var +#' dot_color = var, +#' dot_color_gradient = c("#EEEEFF", "#333377") #' ) #' @export dotPlot <- function( @@ -301,8 +302,8 @@ dotPlot <- function( axis_title = axis_title, axis_text = axis_text, background_color = background_color, - axis.ticks = element_blank(), - axis_text_y_angle = 0 + axis_text_y_angle = 0, + axis.ticks = element_blank() ) pl <- pl + do.call(.gg_theme, args = gg_theme_args) diff --git a/man/dotPlot.Rd b/man/dotPlot.Rd index 2965ad0..088e965 100644 --- a/man/dotPlot.Rd +++ b/man/dotPlot.Rd @@ -145,6 +145,7 @@ dotPlot(g, cluster_column = "leiden_clus", feats = feats, dot_size = mean, - dot_color = var + dot_color = var, + dot_color_gradient = c("#EEEEFF", "#333377") ) } diff --git a/man/theme_dark.Rd b/man/ggplot_themes.Rd similarity index 57% rename from man/theme_dark.Rd rename to man/ggplot_themes.Rd index f1cb534..bcd80bc 100644 --- a/man/theme_dark.Rd +++ b/man/ggplot_themes.Rd @@ -1,16 +1,17 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/gg_settings.R \docType{data} -\name{theme_dark} -\alias{theme_dark} -\title{Dark plotting theme} +\name{ggplot_themes} +\alias{ggplot_themes} +\alias{theme_dark2} +\title{ggplot2 plotting themes} \format{ An object of class \code{theme} (inherits from \code{gg}) of length 10. } \usage{ -theme_dark +theme_dark2 } \description{ -A default dark theme. It can be applied through the \code{theme_param} +ggplot2 themes. It can be applied through the \code{theme_param} arg. } \keyword{datasets}