From 6b95cd08f0921774862d1ab46a7b8358b0c50afb Mon Sep 17 00:00:00 2001 From: "yi.hsiao" Date: Sun, 8 Mar 2026 16:18:21 -0400 Subject: [PATCH] improve label of the volcano plot --- R/volcano_function.R | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/R/volcano_function.R b/R/volcano_function.R index c7cfd6a..bf26725 100644 --- a/R/volcano_function.R +++ b/R/volcano_function.R @@ -175,9 +175,9 @@ plot_volcano_new <- function(dep, contrast, label_size = 3, name_col = NULL, geom_vline(xintercept = 0) + geom_point(aes(col = signif)) + geom_text(data = data.frame(), aes(x = c(Inf, -Inf), - y = c(-Inf, -Inf), - hjust = c(1, 0), - vjust = c(-1, -1), + y = c(Inf, Inf), + hjust = c(1.1, -0.1), + vjust = c(1.5, 1.5), label = c(name1, name2), size = 5, fontface = "bold")) + @@ -454,9 +454,9 @@ plot_volcano_mod <- function(dep, contrast, label_size = 3, name_col = NULL, geom_vline(xintercept = 0) + geom_point(aes(col = significant)) + geom_text(data = data.frame(), aes(x = c(Inf, -Inf), - y = c(-Inf, -Inf), - hjust = c(1, 0), - vjust = c(-1, -1), + y = c(Inf, Inf), + hjust = c(1.1, -0.1), + vjust = c(1.5, 1.5), label = c(name1, name2), size = 5, fontface = "bold")) +