title: Legend with different symbol sizes in base R
body: <p>In my chart I encode some information in the diameter of the circles plotted. My question is, what is the easiest way to document that information in a legend?</p>
  
  <p>Here is what I tried until now:</p>
  
  <pre><code>dat &lt;- rnorm(100)
  cex_brks &lt;- quantile(dat, c(0.25,0.5,0.75))
  cex_size &lt;- c(1,1.4,1.8, 2.2) 
  cex &lt;- rep(NA, length(dat))
  for (i in 1:3) {
      cex[is.na(cex) &amp; dat&lt;=cex_brks[[i]]] &lt;- cex_size[[i]]
  }
  cex[is.na(cex)] &lt;- cex_size[[4]]
  plot(dat, cex=cex, pch=21)
  legend(
      "bottom", 
      legend=c("very small", "small", "large", "very large"), 
      bty="n",
      pch=21,
      cex=cex_size
  )
  </code></pre>
  
  <p>However, doing it this way, not only is the symbol (pch) changed in size, but the legend text as well. How can I override this so that only the legend symbols are different sizes?</p>