Changing the Appearance of Facet Labels size
<p>I know the question was asked here: <a href="https://stackoverflow.com/questions/17825201/is-there-a-way-to-increase-the-height-of-the-strip-text-bar-in-a-facet">Is there a way to increase the height of the strip.text bar in a facet?</a></p>
<p>I want to decrease the height of the strip.text bar without changing the text size. In the current case there is always a space left between text and strip bar walls.</p>
<p>Here is what I tried so far,</p>
<pre><code>library(gcookbook) # For the data set
library(ggplot2)

ggplot(cabbage_exp, aes(x=Cultivar, y=Weight)) + geom_bar(stat=&quot;identity&quot;) +
facet_grid(.~ Date) +
theme(strip.text = element_text(face=&quot;bold&quot;, size=9,lineheight=5.0),
strip.background = element_rect(fill=&quot;lightblue&quot;, colour=&quot;black&quot;,
size=1))
</code></pre>
<p>In my case it seems that <code>lineheight</code> does not affect anything even if changed to <code>5</code>. Why?<br />
How can I make the strip bar size a little smaller but keeping the text size the same?</p>
<p><a href="https://i.stack.imgur.com/YkMDH.png" rel="noreferrer"><img src="https://i.stack.imgur.com/YkMDH.png" alt="enter image description here" /></a></p>
<h1>edit after @Sandy Muspratt answer</h1>
<p>we are able to reduce the strip size if there is  only one row of <code>facets</code>.</p>
<pre><code>g = ggplotGrob(p)
g$heights[c(3)] = unit(.4, &quot;cm&quot;)  # Set the height

grid.newpage()
grid.draw(g)
</code></pre>
<p><a href="https://i.stack.imgur.com/SjqO6.png" rel="noreferrer"><img src="https://i.stack.imgur.com/SjqO6.png" alt="enter image description here" /></a></p>
<p>However, in my real data I have many rows of plot like below and when I changed the elements of g$heights nothing happened!</p>
<pre><code>p = ggplot(cabbage_exp, aes(x=Cultivar, y=Weight)) + geom_bar(stat=&quot;identity&quot;) +
  facet_wrap(~ Date,ncol = 1) +
  theme(strip.text = element_text(face=&quot;bold&quot;, size=9),
        strip.background = element_rect(fill=&quot;lightblue&quot;, colour=&quot;black&quot;,size=1))
</code></pre>
<p><a href="https://i.stack.imgur.com/pNqAy.png" rel="noreferrer"><img src="https://i.stack.imgur.com/pNqAy.png" alt="enter image description here" /></a></p>
<pre><code> g = ggplotGrob(p)
g$heights
#    [1] 5.5pt               0cm                 0.66882800608828cm  #1null               0cm                 0.193302891933029cm
#     [7] 0.66882800608828cm  1null               0cm                 #0.193302891933029cm 0.66882800608828cm  1null              
#    [13] 0.456194824961948cm 0cm                 1grobheight         5.5pt
</code></pre>
<p>then I attempted to change <code>1,7 and 11</code> elements</p>
<pre><code>g$heights[c(3,7,11)] = unit(.4, &quot;cm&quot;)  # Set the height

grid.newpage()
grid.draw(g)
</code></pre>
<p><a href="https://i.stack.imgur.com/PkZNE.png" rel="noreferrer"><img src="https://i.stack.imgur.com/PkZNE.png" alt="enter image description here" /></a></p>
<p>No change in the facet label size.</p>
<pre><code>&gt; g$heights
 [1] 5.5pt                                                       1grobheight                                                
 [3] sum(0.2cm, sum(0.15cm, 0.8128cm, 0cm, 0.15cm), 0.2cm)+0.2cm 0.2                                                        
 [5] 1null                                                       0cm                                                        
 [7] 0.193302891933029cm                                         0.2                                                        
 [9] 1null                                                       0cm                                                        
[11] 0.193302891933029cm                                         0.2                                                        
[13] 1null                                                       0cm                                                        
[15] 0.193302891933029cm                                         0.2                                                        
[17] 1null                                                       0.456194824961948cm                                        
[19] 0cm                                                         1grobheight                                                
[21] 5.5pt  
</code></pre>