title: How to use italics, bold, and new lines in a plot title in R
body: <p>I am using barplot in R and need the title to follow APA format. I need to write 'Figure 1' in bold, then include an empty line, then write the title in italics, and it all needs to be left aligned. So, the title needs to read like this:</p>
  <p><strong>Figure 1</strong></p>
  <p><em>Reasons for Stops Compared</em></p>
  <p>The best solution I have come up with so far is using the title() and expression() functions. However, when I do this, the second line (title) becomes indented and no matter what I try I cannot get the right combination of formatting to work without introducing a new problem. See <a href="https://i.stack.imgur.com/lfF5V.png" rel="nofollow noreferrer">example</a></p>
  <p>here is example code to use</p>
  <pre><code>par(mar = c(5,4,5,1))
  
  barplot(c(1, 1, 1), beside = T, col = 'black',
          names.arg = c(&quot;Investigatory&quot;, &quot;Safety&quot;, &quot;Checkpoint&quot;),
          ylab = &quot;Proportions&quot;, xlab = &quot;Black / White&quot;)
  
  title(main = expression(bold(&quot;Figure 1\n\n&quot;)~italic(&quot;Reasons for Stops Compared&quot;)), line = 1, adj = 0)
  
  abline(h = c(1))
  </code></pre>