title: How to make a basic plot more beautiful using plot() function in R
body: <p>I am creating an R script to produce a chart consisting of multiple lines. I have produced a basic chart, and have managed to smooth each of the plotted lines. However, I want to beautify the chart by doing the following:</p>
  
  <ol>
  <li><p>Currently, each line is plotted as a smoothed line. I want to plot the smoothed line using some other line type e.g. dash-dot, dash-dash-dot etc.</p></li>
  <li><p>I want to add a legend to the chart, and display a line (same color as the line it represents in the main chart), in the legend.</p></li>
  <li><p>Specify font size for the main chart title, x and y </p></li>
  </ol>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>dat  &lt;- read.csv(filename, sep=',')
  
  xvals &lt;- dat$xvals
  y1  &lt;- dat$y1
  y2  &lt;- dat$y2
  y3  &lt;- dat$y3
  y4  &lt;- dat$y4
  y5  &lt;- dat$y5
  y6  &lt;- dat$y6
  
  lo1 &lt;- loess(y1~xvals)
  lo2 &lt;- loess(y2~xvals)
  lo3 &lt;- loess(y3~xvals)
  lo4 &lt;- loess(y4~xvals)
  lo5 &lt;- loess(y5~xvals)
  lo6 &lt;- loess(y6~xvals)
  
  plot(xvals,y1, xlab='X label', ylab='Y label', type='n')
  xl &lt;- seq(min(xvals),max(xvals), (max(xvals) - min(xvals))/1000)
  lines(xl, predict(lo1,xl), col='gray', lwd=1)
  lines(xl, predict(lo2,xl), col='pink', lwd=1)
  lines(xl, predict(lo3,xl), col='red', lwd=1)
  lines(xl, predict(lo4,xl), col='cyan', lwd=1)
  lines(xl, predict(lo5,xl), col='black', lwd=1)
  lines(xl, predict(lo6,xl), col='green', lwd=1)
  
  legend("topright", "(x,y)", pch=1, lty=c(1,1), # gives the legend appropriate symbols (lines)
         , lwd=c(1,1),col=c("blue","red"), inset = .02)
  </code></pre>
  
  <p>How do I modify the code above to implement the requirements 1 - 3 above?</p>
  
  <p>As an aside, I am aware of ggplot. I think I'll stick with plot() - I find ggplot far too cryptic, puzzling and infuriating.</p>