title: color2D.matplot Legend in R
body: <p>Does anyone know how to change the placement of the legend in color2D.matplot (plotrix)? I have a12 x 12 correlation matrix. I noticed I had to reverse the row names and change the margin to get the long names to fit. But now I am stumped on how to move the legend (without increasing the margin even more and making the graph look odd with so much white space at the bottom. Thanks!</p>
  
  <pre><code>cors&lt;-cor(train)cellcol&lt;-color.scale(cbind(cors,c(-1,rep(1,11))),c(0,1),0,c(1,0))[,1:12]
  par(mar = c(10,8,4,2) + 0.1)
  color2D.matplot(cors,cellcolors=cellcol,show.legend=TRUE,show.values=2,
    axes=FALSE, xlab="",ylab="")
  axis(1,at=0.5:11.5,las=2,labels=colnames(cors))
  axis(2,at=0.5:11.5,las=2,labels=rev(rownames(cors)))
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/QBnA1.jpg" alt="alt text"></p>