title: Color legend in a demography plot
body: <p>I have some demogdata from the package <code>demography</code> and I want to put a color legend in the plot. Can someone help me?</p>
  
  <p>For example, in this picture I want to put a lateral color legend with the years from 1940 to 2009.</p>
  
  <pre><code>plot.demogdata(portugal,series='male',years=1940:2009)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/hebZ7.png" alt="enter image description here"></p>