title: GGPLOT : How to add 2nd Y axis Labels for Mean and Standard Deviation using geom_line, geom_hline, annotate
body: <p>Dear StackOverFlow Leaders,</p>
  <p>I have drawn a line plot using geom_line, and I have Concentration on left side of the Y axis. I have also added Mean and Standard Deviation of the data as horizontal lines and text using geom_hline() and annotate() functions.</p>
  <p>How can I change my R code to make the actual text of Mean and Standard Deviation values appear on right hand side of the Y axis ? Any advice/help is appreciated.</p>
  <p>My Data :</p>
  <pre><code>Index   Country Month   Concentration
  1       USA     April   17.1094
  2       USA     April   16.001
  3       USA     April   16.6342
  4       USA     April   17.0215
  5       USA     April   16.6438
  6       USA     May     18.5031
  7       USA     May     19.2239
  8       USA     May     18.3213
  9       USA     May     19.8904
  10      USA     May     19.4935
  </code></pre>
  <p>My Script :</p>
  <pre><code>myData &lt;- data.frame(as.matrix(read.table( &quot;Demo_Data.txt&quot;,  sep=&quot;\t&quot;, header=TRUE )))
  
  
  myData$Concentration &lt;- as.numeric(as.character(myData$Concentration))
  
  Mean &lt;- round(mean(myData$Concentration, na.rm = TRUE),2)
  SD &lt;- round(sd(myData$Concentration, na.rm = TRUE),2)
  
  ggplot(myData, aes(x = Index, y = Concentration, group=Country)) +
  facet_grid(. ~Month, scales = &quot;free&quot;, space = &quot;free&quot;)  + 
  
  geom_line(aes(color=Country)) + 
  geom_point(aes(color=Country)) + 
  
  ### Mean
  geom_hline(yintercept=Mean, color = &quot;black&quot;, size=1) +
  annotate(geom=&quot;text&quot;, x=5, y=Mean+0.2, label=paste(&quot;Mean : &quot;, round(Mean,1), sep=&quot;&quot;), color=&quot;black&quot;, fontface=&quot;bold&quot;) +
  
  ### Mean + (1 * SD)
  geom_hline(yintercept=Mean+SD, color = &quot;black&quot;, linetype=&quot;dashed&quot;, size=1) +
  annotate(geom=&quot;text&quot;, x=5, y=Mean+SD+0.2, label=paste(&quot;+1*SD : &quot;, round(Mean+SD,1), sep=&quot;&quot;), color=&quot;black&quot;, fontface=&quot;bold&quot;) +
  
  ### Mean - (1 * SD)
  geom_hline(yintercept=Mean-SD, color = &quot;black&quot;, linetype=&quot;dashed&quot;, size=1) +
  annotate(geom=&quot;text&quot;, x=5, y=Mean-SD-0.2, label=paste(&quot;-1*SD : &quot;, round(Mean-SD,1), sep=&quot;&quot;), color=&quot;black&quot;, fontface=&quot;bold&quot;) +
  
  ### Mean + (2 * SD)
  geom_hline(yintercept=Mean+(2*SD), color = &quot;black&quot;, linetype=&quot;dotted&quot;, size=1) +
  annotate(geom=&quot;text&quot;, x=5, y=Mean+(2*SD)+0.2, label=paste(&quot;+2*SD : &quot;, round(Mean+(2*SD),1), sep=&quot;&quot;), color=&quot;black&quot;, fontface=&quot;bold&quot;) +
  
  ### Mean - (2 * SD)
  geom_hline(yintercept=Mean-(2*SD), color = &quot;black&quot;, linetype=&quot;dotted&quot;, size=1) +
  annotate(geom=&quot;text&quot;, x=5, y=Mean-(2*SD)-0.2, label=paste(&quot;-2*SD : &quot;, round(Mean-(2*SD),1), sep=&quot;&quot;), color=&quot;black&quot;, fontface=&quot;bold&quot;) + 
  
  theme(axis.title.y = element_text(size=14, face=&quot;bold&quot;, colour = &quot;black&quot;),
  axis.text.y = element_text(size=10, face=&quot;bold&quot;, colour = &quot;black&quot;),
  strip.text = element_text(face = &quot;bold&quot;, size=14)) + 
  
  ylim(14,21)
  </code></pre>
  <p>I have explored sec.axis() function, but that may not be appropriate for this case.</p>
  <p>Both My_Current_Plot and My_Desired_Plot are posted here. The above R code generates My_Current_Plot, and Please advise on how to change/improve the code to create My_Desired_Plot</p>
  <p><a href="https://i.stack.imgur.com/hO7lp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hO7lp.png" alt="My_Current_PLot" /></a></p>
  <p><a href="https://i.stack.imgur.com/IaiJK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IaiJK.png" alt="My_Desired_Plot" /></a></p>