diff --git a/.Rbuildignore b/.Rbuildignore index 53e15ab8d4341196a3ff4aac2aa0cd4f74055efb..aee6888682b99af2788015942fbc09e0e5972b3d 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,6 +1,7 @@ -.git -.gitignore -.tar.gz -.pdf -./.nc -README.Rmd +.*\.git$ +.*\.gitignore$ +.*\.tar.gz$ +.*\.pdf$ +./.nc$ +README.Rmd$ +\..*\.RData$ diff --git a/R/PlotEquiMap.R b/R/PlotEquiMap.R index 51599dc70f90f5440f61f0fab8bae9a5e3cf5663..8c3e3a073bfae5312249281eadca27846a39113e 100644 --- a/R/PlotEquiMap.R +++ b/R/PlotEquiMap.R @@ -640,6 +640,10 @@ PlotEquiMap <- function(var, lon, lat, varu = NULL, varv = NULL, # Colorbar # ~~~~~~~~~~ # + if (toptitle != "") { + margins[3] <- margins[3] - (cex_title + 1) + par(mar = margins) + } if (drawleg) { ColorBar(brks, cols, FALSE, subsampleg, bar_limits, var_limits, triangle_ends, col_inf = col_inf, col_sup = col_sup, diff --git a/R/Utils.R b/R/Utils.R index d8ffa744c673527c7085450e96528e1ef7a2c290..4460018139d3bf55bfd8cc3f9b1b2a4f6f17f850 100644 --- a/R/Utils.R +++ b/R/Utils.R @@ -1539,6 +1539,11 @@ # It expects as inputs two named numeric vectors, and it extends them # with dimensions of length 1 until an ordered common dimension # format is reached. +# The first output is dims1 extended with 1s. +# The second output is dims2 extended with 1s. +# The third output is a merged dimension vector. If dimensions with +# the same name are found in the two inputs, and they have a different +# length, the maximum is taken. .MergeArrayDims <- function(dims1, dims2) { new_dims1 <- c() new_dims2 <- c() @@ -1566,7 +1571,7 @@ new_dims1 <- c(new_dims1, dims_to_add) new_dims2 <- c(new_dims2, dims2) } - list(new_dims1, new_dims2) + list(new_dims1, new_dims2, pmax(new_dims1, new_dims2)) } # This function takes two named arrays and merges them, filling with