diff --git a/NEWS.md b/NEWS.md index 72902fb..3ee483b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -55,6 +55,9 @@ The reason of these modification is to allow for a much clearer and concise outp - Fixed a bug in which scores were not actually being scaled when `scale_scores = TRUE`. - Fixed a bug in which setting `scale_scores = TRUE` and `features.order` would trigger an error since the output had the suffix `_scaled` on it. This has been patched. +## do_FeaturePlot() +- Fixed a bug in which legend titles would not show up as intended. + ## do_LigandReceptorPlot() - Added a new parameter `top_interactions_by_group` which when set to `TRUE` will report for each pair of `source` and `target`, as many interactions as stated in `top_interactions`. diff --git a/R/do_FeaturePlot.R b/R/do_FeaturePlot.R index 8ea7340..145c703 100644 --- a/R/do_FeaturePlot.R +++ b/R/do_FeaturePlot.R @@ -1016,8 +1016,9 @@ do_FeaturePlot <- function(sample, counter <- 0 for (feature in features){ counter <- counter + 1 + legend.title.use <- ifelse(is.null(legend.title), feature, legend.title) p[[counter]] <- modify_continuous_legend(p = p[[counter]], - legend.title = legend.title, + legend.title = legend.title.use, legend.aes = "color", legend.type = legend.type, legend.position = legend.position,