From 84a0f89b6adbadeb8b041407a5fc7e8798b673bb Mon Sep 17 00:00:00 2001 From: Yunuuuu Date: Thu, 7 Nov 2024 22:36:55 +0800 Subject: [PATCH] fix Docs --- R/layout-.R | 11 ++--------- man/layout-operator.Rd | 11 ++--------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/R/layout-.R b/R/layout-.R index 78231bfc..fe4801c3 100644 --- a/R/layout-.R +++ b/R/layout-.R @@ -96,12 +96,14 @@ methods::setMethod("$", "Layout", function(x, name) { #' ggalign() + #' geom_point(aes(y = value)) #' +#' # `&` operator apply it to all plots #' ggheatmap(mat) + #' anno_top() + #' align_dendro() & #' theme(panel.border = element_rect( #' colour = "red", fill = NA, linewidth = unit(2, "mm") #' )) +#' # `-` operator only apply it to the active annotation #' ggheatmap(mat) + #' anno_top() + #' align_dendro() - @@ -109,15 +111,6 @@ methods::setMethod("$", "Layout", function(x, name) { #' colour = "red", fill = NA, linewidth = unit(2, "mm") #' )) #' -#' # used in the layout, define the default action for all plots in the layout -#' ggheatmap(matrix(rnorm(72), nrow = 8)) - -#' theme(plot.background = element_rect(fill = "red")) -#' -#' # You can also add it for a single plot -#' ggheatmap(matrix(rnorm(72), nrow = 8)) - -#' theme(plot.background = element_rect(fill = "red")) + -#' # here, we modify the plot action for the heatmap body -#' theme(plot.background = element_rect(fill = "blue")) #' @name layout-operator NULL diff --git a/man/layout-operator.Rd b/man/layout-operator.Rd index bb0300e8..94e06078 100644 --- a/man/layout-operator.Rd +++ b/man/layout-operator.Rd @@ -68,12 +68,14 @@ ggheatmap(mat) + ggalign() + geom_point(aes(y = value)) +# `&` operator apply it to all plots ggheatmap(mat) + anno_top() + align_dendro() & theme(panel.border = element_rect( colour = "red", fill = NA, linewidth = unit(2, "mm") )) +# `-` operator only apply it to the active annotation ggheatmap(mat) + anno_top() + align_dendro() - @@ -81,13 +83,4 @@ ggheatmap(mat) + colour = "red", fill = NA, linewidth = unit(2, "mm") )) -# used in the layout, define the default action for all plots in the layout -ggheatmap(matrix(rnorm(72), nrow = 8)) - - theme(plot.background = element_rect(fill = "red")) - -# You can also add it for a single plot -ggheatmap(matrix(rnorm(72), nrow = 8)) - - theme(plot.background = element_rect(fill = "red")) + - # here, we modify the plot action for the heatmap body - theme(plot.background = element_rect(fill = "blue")) }