title: R - put labels inside pie chart
body: <p>Using the <code>pie</code> function in R, the labels appear outside of the pie. Is there a way to place labels inside each slice of the pie chart?</p>
  <pre><code>f=table(LETTERS[c(rep(1,7),rep(2,10),rep(3,5))])
  pie(f)
  </code></pre>
  <p>It shows how to do this with <code>ggplot</code> here <a href="https://stackoverflow.com/questions/20443467/place-labels-on-pie-chart">place-labels-on-pie-chart</a>. Is there no way to do it with the <code>pie</code> function?</p>
  <p>Edit: In response to some comments about the use of pie charts, I'd like to elaborate my intention with them. I'm actually just using the pie chart as part of a scatterplot matrix to visualize a whole data frame for regression. The matrix is set up as follows:</p>
  <ul>
  <li>Lower panels<br />
  Sample correlation numbers with the background colored darker for higher absolute correlation.</li>
  <li>Upper panels
  <ul>
  <li>Scatterplots for numeric by numeric</li>
  <li>Boxplots for numeric by factor</li>
  </ul>
  </li>
  <li>Diagonal panels
  <ul>
  <li>Histograms with normal densities for numeric</li>
  <li>Pie chart for factor</li>
  </ul>
  </li>
  </ul>
  <p>See, I needed something for factors on the diagonal and decided on a pie chart. I decided to leave the labels out anyway and took off all axis labeling as well. I rather used darker colors for bigger pie slices... so perhaps it may be a bad way to display information but I think it works well for a factor variable, showing how the observations are proportioned across factor levels better than a barplot would do. The figure below describes the diabetes data set in the <code>lars</code> package.</p>
  <p><img src="https://i.stack.imgur.com/W5XLB.png" alt="diabetes data set" /></p>