title: Plotting legend and getting: Error in strwidth(legend, units = "user", cex = cex, font = text.font) : plot.new has not been called yet
body: <p>I've created multiple time series in rStudio. And I am attempting to plot it using <code>ts.plot()</code>. The plot works fine but adding a legend causes issues and gives :</p>
  
  <blockquote>
    <p>Error in strwidth(legend, units = "user", cex = cex, font = text.font) : plot.new has not been called yet. </p>
  </blockquote>
  
  <p>I have tried running all the code at once and adjusting the parameters.</p>
  
  <pre><code>ts.plot(nltnr.ts, peitnr.ts, nstnr.ts, nbtnr.ts, qbtnr.ts, ontnr.ts, mbtnr.ts, sktnr.ts, abtnr.ts, bctnr.ts, yktnr.ts, nttnr.ts, nvtnr.ts,
          gpars = list(
          ylab = "Amount in millions",
          col=1:12,
          legend("bottom", legend = 1:12)
          ))
  
  </code></pre>