title: How to modify this Correlation Matrix plot?
body: <p>I have the following codes to display a correlation matrix,</p>
  
  <pre><code>panel.cor &lt;- function(x, y, digits=2, prefix="", cex.cor)
  {
      usr &lt;- par("usr"); on.exit(par(usr))
      par(usr = c(0, 1, 0, 1))
      r &lt;- abs(cor(x, y))
      txt &lt;- format(c(r, 0.123456789), digits=digits)[1]
      txt &lt;- paste(prefix, txt, sep="")
      if(missing(cex.cor)) cex &lt;- 0.8/strwidth(txt)
  
      test &lt;- cor.test(x,y)
      # borrowed from printCoefmat
      Signif &lt;- symnum(test$p.value, corr = FALSE, na = FALSE,
                    cutpoints = c(0, 0.001, 0.01, 0.05, 0.1, 1),
                    symbols = c("***", "**", "*", ".", " "))
  
      text(0.5, 0.5, txt, cex = cex * r)
      text(.8, .8, Signif, cex=cex, col=2)
  }
  pairs(USJudgeRatings[,c(2:3,6,1,7)],
    lower.panel=panel.smooth, upper.panel=panel.cor)
  </code></pre>
  
  <p>I want to modify the plot like:</p>
  
  <ol>
  <li><p>Have smaller blue dots as</p>
  
  <pre><code>pairs(USJudgeRatings[,c(2:3,6,1,7)],
        main="xxx",
        pch=18,
        col="blue",
        cex=0.8)
  </code></pre></li>
  <li><p>Include a histogram of the entries on the diagonal (as seen in <a href="http://gettinggeneticsdone.blogspot.co.uk/2012/08/more-on-exploring-correlations-in-r.html" rel="nofollow noreferrer">enter link description here</a>)</p></li>
  <li><p>Display the correlation and p-value as</p>
  
  <pre><code>r=0.9;
  p=0.001;
  </code></pre></li>
  </ol>
  
  <p>with values not stars.</p>
  
  <p>There is a fitting line displayed for the scatter plot of the paired data. What is the method used for the fitting? Which line is defined the fitting as the codes shown above? And how to change the fitting method?</p>