title: Increase colorkey title font size on levelplot
body: <p>I am trying to increase the title for a legend in a levelplot graph saved to a variable. I've used code from <a href="https://stackoverflow.com/questions/36874897/r-how-to-add-legend-title-to-levelplot-saved-to-a-variable">here</a> to add a colorkey legend title to a levelplot graph that is saved to a variable.</p>
  
  <pre><code>library(lattice)
  library(grid)
  
  # Amend key function
  # Hopefully a nicer way to do this!
  mykey &lt;- draw.colorkey
  
  body(mykey)[28:30] &lt;- list(
  quote(
    if(!is.null(key$title)){
        key.gf &lt;- placeGrob(key.gf,
                        textGrob(key$title,hjust=key$hjust, vjust=key$vjust, gp=key$gp),
                            row=key$row, col=key$column)
    }),
  body(mykey)[[28]], 
  body(mykey)[[29]])
  
  # Assign to namespace: https://stackoverflow.com/questions/6254744/override-a-function-that-is-imported-in-a-namespace
  unlockBinding("draw.colorkey", as.environment("package:lattice"))
  assign("draw.colorkey", mykey, "package:lattice")
  unlockBinding("draw.colorkey", getNamespace("lattice"))
  assign("draw.colorkey", mykey, getNamespace("lattice"))
  # Draw plot
  x = 1:10
  y = rep(x,rep(10,10))
  x = rep(x,rep(10))
  z = x+y 
  p &lt;- levelplot(z~x*y, 
                colorkey=list(labels=list(cex=1, font=2, col="brown"),
                              height=1, width=1.4,
                              title=expression(m^3/m^3), row=3, column=1, vjust=2),
                 main=list('b',side=1,line=0.5))
  
  
  p
  </code></pre>
  
  <p>But I would like to increase the font size of the legend title. I tried specifying <code>gp=gpar(fontsize=14)</code> and <code>gp=gpar(cex=9)</code> after the <code>vjust</code> argument, but the font size doesn't change. Not entirely sure how the <code>gp</code> argument works, I assumed it follows <code>grid.text</code> and takes from <code>gpar</code> but it doesn't seem to work?</p>