I have tried with all options of colorbar in corrplot. However, when the matrix being plotted is very thin (low number of columns), the colorbar seems to step on top of the right margin. How to avoid this? Is there a parameter to control for spacing?
# Create the matrix
mat <- matrix(c(0.8, 0.6, 1, 0.2, 0, 0.2, 0.3, 0.4, 0.3,
-0.8, -0.6, -1, -0.2, 0, -0.2, -0.3, -0.4, -0.4),
ncol = 2, byrow = TRUE)
corrplot(mat, method = c("color"),
cl.ratio = 1,
# cl.offset = 0.5,
# cl.align.text = "l",
)
Recognized by R Language Collective