Skip to content

Commit

Permalink
prevent ComplexHeatmap legends
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunuuuu committed Jul 11, 2024
1 parent 3cd77dc commit 0b06ee2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions R/ggheat.R
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ eheat_prepare.ggHeatmap <- function(object, ...) {
p <- p + scales$column[[1L]] + scales$row[[1L]]
}

# we always prevent the ComplexHeatmap Heatmap body legend.
object@heatmap_param$show_heatmap_legend <- FALSE

# if user provided `ggfn` or rect_gp$type is not none,
# we should do something with `ggfn`
if (is.null(object@ggfn) && identical(rect_gp$type, "none")) {
Expand Down Expand Up @@ -247,7 +250,5 @@ eheat_prepare.ggHeatmap <- function(object, ...) {
object@legends_panel <- get_guides(gt, margins = "i")
object@legends_margin <- get_guides(gt)

# we always prevent the ComplexHeatmap Heatmap body legend.
object@heatmap_param$show_heatmap_legend <- FALSE
object
}
Loading

0 comments on commit 0b06ee2

Please sign in to comment.