title: using text() in R
body: <p>I am trying to re-label and adjust my x-axis in a barplot using text() in R. Some bits I have managed to fugure out myself already, but now I am stuck with the following issue: I would love to increase the space between my labels in order to fit them nicely under the bar they belong to. Here's what I (amateurishly) have come up with so far:</p>
  
  <pre><code>    lab&lt;-c("Morning (PT)", "Evening (PT)",
             "Morning (LT)", "Evening (LT)",
             "Morning (total)", "Evening (total)")
      barplot(data, names.arg=data$period, 
              col=c("darkorange1",  "firebrick3", "darkolivegreen4", "goldenrod1"), 
              main="", ylab="(%)", xaxt = "n", xlim=c(0,10))
      text(c(1,1,1,1,1,1), labels = lab, srt = 45, 
           adj = c(1,2), xpd = TRUE, cex=.7)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/k79hV.jpg" alt="Plot"></p>
  
  <p>After spending hours trying to unsuccessfully understand the par() argument, I was wondering if someone might be able to help me on this. Maybe there is a nice and simple solution which I have failed to see?</p>
  
  <p>Thanks a lot in advance for any tipps!
  Daniela</p>