title: R: Histogram subtitle with mtext: how to get tabular alignment in columns?
body: <p>I have a plot with a multi-line subtitle: </p>
  
  <p><a href="https://i.stack.imgur.com/1DsvM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1DsvM.png" alt="multiline subtitle plot"></a></p>
  
  <p>Current code for the text:</p>
  
  <pre><code>bq1 &lt;- bquote("Raw: "
                ~ mu 
                ~ "=" 
                ~ .(format(round(mean(stepsperday$steps), digits=2), big.mark=","))
                ~ ", " 
                ~ sigma 
                ~ "=" 
                ~ .(format(round(sd(stepsperday$steps), digits=2), big.mark = ","))
                ~ ", median ="
                ~ .(format(median(stepsperday$steps), big.mark = ","))
  )
  
  bq2 &lt;- bquote("Imputed: "
                ~ mu 
                ~ "=" 
                ~ .(format(round(mean(stepsperday.imputed$steps), digits=2), big.mark=","))
                ~ ", " 
                ~ sigma 
                ~ "=" 
                ~ .(format(round(sd(stepsperday.imputed$steps), digits=2), big.mark = ",", digits = 6))
                ~ ", median ="
                ~ .(format(median(stepsperday.imputed$steps), big.mark = ","))
  )
  
  mytext &lt;- list(bq2, bq1)
  mtext(do.call(expression, mytext),side=3,line=0:1, cex=.75)
  </code></pre>
  
  <p>I would like the 2 lines horizontally aligned on the respective bits of data - the means, sd, median, like they're in a table.</p>
  
  <p>Is there any way to do this?</p>
  
  <p>thanks for any tips,</p>
  
  <p>sff</p>