title: ggplot2: italics in the legend
body: <p>I'm trying to edit the labels in the legend so that the first label (WT) is in plain text, whilst the subsequent 7 are in italics. I have been using <code>element_text(face=c("plain", rep("italic",7)))</code> , but this has resulted in none of the labels being converted to italics. I'm a bit confused why it hasn't worked because <code>element_text(face="italic")</code> converts all the labels into italics. My plot is as follows:</p>
  
  <pre class="lang-r prettyprint-override"><code>library(tidyverse)
  
  for_plot &lt;- read_csv(file =
  "Row, Time, Mutant, Mean
  1, 1, ppi1, 0.8008
  2, 1, sp1-1, 0.8038
  3, 1, sp1-1 ppi1, 0.8094
  4, 1, sp1-2 ppi1, 0.8138
  5, 1, sp1-3 ppi1, 0.8066667
  6, 1, sp1-4 ppi1, 0.7998
  7, 1, sp1-5 ppi1, 0.8026667
  8, 1, Wt, 0.8083333
  9,  21, ppi1, 0.6806
  10, 21, sp1-1, 0.7088
  11, 21, sp1-1 ppi1, 0.6982
  12, 21, sp1-2 ppi1, 0.7126
  13, 21, sp1-3 ppi1, 0.709
  14, 21, sp1-4 ppi1, 0.6942
  15, 21, sp1-5 ppi1, 0.7096667
  16, 21, Wt, 0.7246667
  17, 56, ppi1, 0.6652
  18, 56, sp1-1, 0.6848
  19, 56, sp1-1 ppi1, 0.6816
  20, 56, sp1-2 ppi1, 0.6926
  21, 56, sp1-3 ppi1, 0.6945
  22, 56, sp1-4 ppi1, 0.676
  23, 56, sp1-5 ppi1, 0.6931667
  24, 56, Wt, 0.6946667
  25, 111, ppi1, 0.653
  26, 111, sp1-1, 0.6704
  27, 111, sp1-1 ppi1, 0.6704
  28, 111, sp1-2 ppi1, 0.6756
  29, 111, sp1-3 ppi1, 0.679
  30, 111, sp1-4 ppi1, 0.664
  31, 111, sp1-5 ppi1, 0.6805
  32, 111, Wt, 0.677
  33, 186, ppi1, 0.6132
  34, 186, sp1-1, 0.633
  35, 186, sp1-1 ppi1, 0.6298
  36, 186, sp1-2 ppi1, 0.6402
  37, 186, sp1-3 ppi1, 0.6435
  38, 186, sp1-4 ppi1, 0.6278
  39, 186, sp1-5 ppi1, 0.6478333
  40, 186, Wt, 0.6403333
  41, 281, ppi1, 0.5636
  42, 281, sp1-1, 0.587
  43, 281, sp1-1 ppi1, 0.5828
  44, 281, sp1-2 ppi1, 0.5906
  45, 281, sp1-3 ppi1, 0.5968333
  46, 281, sp1-4 ppi1, 0.5838
  47, 281, sp1-5 ppi1, 0.5983333
  48, 281, Wt, 0.5948333")
  
  for_plot %&gt;%
   ggplot()+
    geom_line(aes(x = Time, y = Mean, col = Mutant)) +
    geom_point(aes(x = Time, y = Mean, col = Mutant)) + 
    labs(title = "Effective PSII Quantum Yield across SP1 Mutants", 
         y = "Effective PSII Quantum Yield",
         x = "Actinic PPFD") +
    theme(plot.title = element_text(hjust = 0.5)) +
    theme(legend.text = element_text(face=c("plain", rep("italic",7))))
  </code></pre>
  
  <p><img src="https://i.imgur.com/nFIEBdX.png" alt=""></p>
  
  <p><sup>Created on 2020-01-01 by the <a href="https://reprex.tidyverse.org" rel="nofollow noreferrer">reprex package</a> (v0.3.0)</sup></p>