title: Forest Plot Design questions
body: <p>I am creating a forest plot with the forestplot() function.</p>
  <p>The forest plot looks like this:
  <a href="https://i.stack.imgur.com/r4AZb.png" rel="nofollow noreferrer">Forest Plot</a></p>
  <pre><code>    ## Labels defining subgroups are a little indented!
  subgps &lt;- c(4,5,8,9,12,13,16,17,20,21,24,25,28,29,32,33)
  data$Variable[subgps] &lt;- paste(&quot;  &quot;,data$Variable[subgps]) 
  align = c(&quot;l&quot;, &quot;l&quot;, &quot;l&quot;, &quot;l&quot;, &quot;l&quot;, &quot;l&quot;, &quot;l&quot;, &quot;l&quot;, &quot;l&quot;, &quot;l&quot;, &quot;l&quot;)
  
  library(forestplot)
  png(file.path(workdir,&quot;Figures\\Forestplot3.png&quot;),width=1280, height=1000)
  forestplot(labeltext=tabletext, graph.pos=3, 
             mean=c(NA,NA,data$Point.Estimate), 
             lower=c(NA,NA,data$Low), upper=c(NA,NA,data$High),
             title=&quot;Hazard Ratio&quot;,
             xlab=&quot;&lt;---favors no ß-blockers---  ---favors ß-blockers---&gt;&quot;, xlab.position=&quot;left&quot;,
             hrzl_lines=list(&quot;3&quot; = gpar(lwd=1, col=&quot;#99999922&quot;), 
                             &quot;5&quot; = gpar(lwd=60, lineend=&quot;butt&quot;, columns=c(2:6), col=&quot;#99999922&quot;),
                             &quot;14&quot; = gpar(lwd=85, lineend=&quot;butt&quot;, columns=c(2:6), col=&quot;#99999922&quot;),
                             &quot;23&quot; = gpar(lwd=60, lineend=&quot;butt&quot;, columns=c(2:6), col=&quot;#99999922&quot;),
                             &quot;31&quot; = gpar(lwd=60, lineend=&quot;butt&quot;, columns=c(2:6), col=&quot;#99999922&quot;),
                             &quot;39&quot; = gpar(lwd=60, lineend=&quot;butt&quot;, columns=c(2:6), col=&quot;#99999922&quot;),
                             &quot;47&quot; = gpar(lwd=60, lineend=&quot;butt&quot;, columns=c(2:6), col=&quot;#99999922&quot;),
                             &quot;54&quot; = gpar(lwd=27, lineend=&quot;butt&quot;, columns=c(2:6), col=&quot;#99999922&quot;)),
             txt_gp=fpTxtGp(label=gpar(cex=1.25),
                            ticks=gpar(cex=1.1),
                            xlab=gpar(cex = 1.2),
                            title=gpar(cex = 1.2)),
             col=fpColors(box=&quot;blue&quot;, lines=&quot;black&quot;, zero = &quot;gray50&quot;),
             zero=1, cex=0.9, lineheight = &quot;auto&quot;, boxsize=0.5, colgap=unit(6,&quot;mm&quot;),
             lwd.ci=2, ci.vertices=TRUE, ci.vertices.height = 0.4)
  x = .353
  y0 = .08
  y1 = .91
  grid.lines(c(x, x), c(y0, y1), default.units = &quot;npc&quot;,
             gp = gpar(lwd = 1.7, col=&quot;#880000&quot;))
  
  dev.off()
  </code></pre>
  <p>I have two design problems:</p>
  <ol>
  <li><p>In the upper pink bubble you can see that there is a problem with the text alignment. How can I change this?</p>
  </li>
  <li><p>In the lower pink bubble there is a problem with the grey background. It is defined by &quot;&quot;54&quot; = gpar(lwd=27, lineend=&quot;butt&quot;, columns=c(2:6), col=&quot;#99999922&quot;)),&quot;, but if I choose line 53 or line 54 it does not work. So the grey background does not fit to the text.</p>
  </li>
  </ol>
  <p>Can anyone help? Thank you!</p>