From d6bd279243896055e94fb71ceedaaad2efef3fc1 Mon Sep 17 00:00:00 2001 From: aduvermy <arnaud.duvermy@ens-lyon.fr> Date: Tue, 24 Oct 2023 16:17:57 +0200 Subject: [PATCH] add xlab/ylab --- R/rocplot.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/rocplot.R b/R/rocplot.R index 352ced3..1745b02 100644 --- a/R/rocplot.R +++ b/R/rocplot.R @@ -47,7 +47,7 @@ getLabelExpected <- function(comparison_df, coeff_threshold, alt_hypothesis) { #' @param ... additional params to pass ggplot2::aes #' @return A ggplot object representing the ROC curve plot. #' @importFrom plotROC geom_roc -#' @importFrom ggplot2 ggtitle theme_bw aes sym +#' @importFrom ggplot2 ggtitle theme_bw aes sym xlab ylab #' #' @examples #' comparison_data <- data.frame( @@ -75,7 +75,9 @@ roc_plot <- function(comparison_df, ...) { p <- ggplot2::ggplot(comparison_df, ggplot2::aes(d = !isDE , m = p.adj, !!!args )) + plotROC::geom_roc(n.cuts = 0, labels = FALSE) + ggplot2::theme_bw() + - ggplot2::ggtitle("ROC curve") + ggplot2::ggtitle("ROC curve") + + ggplot2::xlab("False positive rate") + + ggplot2::ylab("True positive rate") ## -- annotation AUC df_AUC <- subset(plotROC::calc_auc(p) , select = -c(PANEL, group)) -- GitLab