diff --git a/R/plotting.R b/R/plotting.R index 31bbfe4..66f112c 100644 --- a/R/plotting.R +++ b/R/plotting.R @@ -170,7 +170,7 @@ plotVolcano <- function( volcano <- ggplot(data = stats, aes(x = mean_diff, y = -log10(welch_padj), color = Color, - label = stats$label)) + + label = label)) + geom_vline(xintercept = c(FC, -FC), lty = "dashed") + geom_hline(yintercept = -log10(pvalue), lty = "dashed") + geom_point(na.rm = TRUE) + @@ -355,9 +355,7 @@ pdVolcano <- function( vol_result$plt$weighted_differential_expression + theme(legend.position = "none"), ncol = 2L, align = "h") - legend <- cowplot::get_legend(vol_result$plt$differential_expression + - guides(color = guide_legend(nrow = 1L)) + - theme(legend.position = "bottom")) + legend <- cowplot::get_plot_component(result$plt$differential_expression, "guide-box-bottom") plt <- cowplot::plot_grid(pltgrid, legend, ncol = 1L, diff --git a/R/projectionDriveRfun.R b/R/projectionDriveRfun.R index 91dd4e2..3776320 100644 --- a/R/projectionDriveRfun.R +++ b/R/projectionDriveRfun.R @@ -340,9 +340,7 @@ projectionDriveR <- function( result$plt$weighted_differential_expression + theme(legend.position = "none"), ncol = 2L, align = "h") - legend <- cowplot::get_legend(result$plt$differential_expression + - guides(color = guide_legend(nrow = 1L)) + - theme(legend.position = "bottom")) + legend <- cowplot::get_plot_component(result$plt$differential_expression, "guide-box-bottom") plt <- cowplot::plot_grid(pltgrid, legend, ncol = 1L, rel_heights = c(1.0, 0.1)) print(plt) }