title: Finetuning a forest plot with ggplot2
body: <p>I am trying to make a forest plot in R, displaying results from a meta-analysis. However, I run into problems using ggplot2. I have not found similar questions on stackoverflow so far and would really appreciate some help.</p>
  <p>The code I am using now looks like this (I changed it a bit to make it self-containing):</p>
  <pre><code>cohort &lt;- letters[1:15]
  population &lt;- c(  runif(15, min=2000, max=50000)) #hit1$N
  beta &lt;-  c(  runif(15, min=-1, max=2))
  lower95 &lt;- c(runif(15, min=-1.5, max=0.5))
  upper95 &lt;- c(runif(15, min=1.5, max=2.5))
  type &lt;- c(&quot;CBCL&quot;,&quot;SDQ&quot;,&quot;CBCL&quot;,&quot;SDQ&quot;,&quot;CBCL&quot;,&quot;SDQ&quot;,&quot;CBCL&quot;)
  data &lt;- as.data.frame(cbind(cohort, population, beta ,lower95,upper95,type))
  
  
  ggplot(data=data, aes(x=cohort, y=beta))+
    geom_errorbar(aes(ymin=lower95, ymax=upper95), width=.667) +
    geom_point(aes(size=population, fill=type), colour=&quot;black&quot;,shape=21)+
    geom_hline(yintercept=0, linetype=&quot;dashed&quot;)+
    scale_x_discrete(name=&quot;Cohort&quot;)+
    coord_flip()+
    scale_shape(solid=FALSE)+
    scale_fill_manual(values=c( &quot;CBCL&quot;=&quot;white&quot;, &quot;SDQ&quot;=&quot;black&quot;))+
    labs(title=&quot;Forest Plot&quot;) +
    theme_bw()
  </code></pre>
  <p>Now, I have the following issues:</p>
  <ul>
  <li>The x-axis is unreadable because all the values are overlapping.</li>
  <li>The legend to the right ('population') displays all the values, but I want it solely to display some arbitrary values, like 5000, 10000 and 15000.</li>
  <li>The plot should have a dashed line at y=0, but this line is displayed to the far right of the plot, which can't be right.</li>
  <li>I would like to add additional text columns to the right of each bar (to display additional info for each specific cohort).</li>
  <li>Any modifications to make the plot 'prettier' is always welcome.</li>
  </ul>
  <p>Thanks in advance!</p>