title: Align text inside a plot
body: <p>I am an R newbie and had a question. I am trying to place some text into an R plot. Here's some code using the brightness dataset in the UsingR package.</p>
  
  <pre><code>    library(UsingR)
      brightness
  
      MyMean &lt;- mean(brightness)
      MyMedian &lt;- median(brightness)
      MySd &lt;- sd(brightness)
  
      hist(brightness, breaks=35, main="This is a Histogram", 
           xlab="Brightness", ylab="Frequency", xlim=c(0,15), ylim=c(0, 200))
  
      text(3.5, 150, paste("Mean =", round(MyMean, 1), "\n Median =", 
           round(MyMedian, 1), "\n Std.Dev =", round(MySd, 1)))
  </code></pre>
  
  <p>This code produces:</p>
  
  <p><img src="https://i.stack.imgur.com/x8qKL.png" alt="enter image description here"></p>
  
  <p>The issue with this output is that the text is not left left alligned. Does anyone know how to make the text left alligned.</p>
  
  <p>Thanks.</p>