Skip to content

Commit

Permalink
Fixed ncol warning for plot_data_heatmap
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviaAB committed Feb 15, 2024
1 parent a7dc1ab commit 33b69c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/multidataset_plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ plot_meansd_data <- function(mo_data,
#' @inheritParams .add_features_labels_toplot
#' @param legend_title_size Integer, size in points of legend title.
#' @param legend_text_size Integer, size in points of legend elements text.
#' @param legend_ncol Integer, number of columns in the legend. Default value is
#' `1`.
#' @param ... Additional arguments passed to the [ComplexHeatmap::Heatmap()]
#' function.
#' @returns A [ComplexHeatmap::Heatmap-class] object.
Expand Down Expand Up @@ -268,6 +270,7 @@ plot_data_heatmap <- function(mo_data,
truncate = NULL,
legend_title_size = 10,
legend_text_size = 10,
legend_ncol = 1,
...) {
## For devtools::check
dataset <- values <- label <- sample_id <- feature_id <- NULL
Expand Down Expand Up @@ -408,7 +411,7 @@ plot_data_heatmap <- function(mo_data,
gp = grid::gpar(col = "white"),
annotation_legend_param = list(
direction = "horizontal",
ncol = 3,
ncol = legend_ncol,
title_position = "topcenter",
labels_gp = grid::gpar(fontsize = legend_text_size),
title_gp = grid::gpar(fontsize = legend_title_size, fontface = "bold")
Expand All @@ -435,7 +438,7 @@ plot_data_heatmap <- function(mo_data,
gp = grid::gpar(col = "white"),
annotation_legend_param = list(
direction = "horizontal",
ncol = 3,
ncol = legend_ncol,
title_position = "topcenter",
labels_gp = grid::gpar(fontsize = legend_text_size),
title_gp = grid::gpar(fontsize = legend_title_size, fontface = "bold")
Expand Down
4 changes: 4 additions & 0 deletions man/plot_data_heatmap.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 33b69c2

Please sign in to comment.