From 5f06314de65344d8e94dd27f751099e44cc98919 Mon Sep 17 00:00:00 2001 From: emolinab Date: Mon, 5 Feb 2024 12:14:40 +0100 Subject: [PATCH] palette option plotCorrHist2D --- R/plotCorrHist2D.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/plotCorrHist2D.R b/R/plotCorrHist2D.R index c2b018b..2f60482 100644 --- a/R/plotCorrHist2D.R +++ b/R/plotCorrHist2D.R @@ -43,7 +43,7 @@ plotCorrHist2D <- function(x, y, title = NULL, xlab = "x", ylab = "y", bins = 40, limx=NULL, limy=NULL, folder = NULL, file = "", breaks = waiver(),nrows=2, ncols=2, axisFont=13, axisTitleFont=13,TitleFontSize=15,legendTitleFont=12,legendTextFont=10, - statFont=4, table=FALSE, stat=TRUE) { + statFont=4, table=FALSE, stat=TRUE,palette="RdYlBu") { getNames(x) <- gsub(x = getNames(x), pattern = "\\.", replacement = "_") @@ -66,7 +66,7 @@ plotCorrHist2D <- function(x, y, title = NULL, xlab = "x", ylab = "y", bins = 40 plots <- list() corr <- c("Year","Variable", "r2", "MAE", "Bias", "error per unit") - rf <- colorRampPalette(rev(brewer.pal(11, "RdYlBu"))) + rf <- colorRampPalette(rev(brewer.pal(11, palette))) r <- rf(32) # color palette for (na in names) {