title: Adding legend to jFreechart
body: <p>I have come up with my final hysteresis plot, which looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/F4bCY.png" alt="enter image description here"></p>
  
  <p>My earlier post:
  <a href="https://stackoverflow.com/questions/14952712/plotting-a-hysteresis-loop-with-jfreechart">Plotting a hysteresis loop with jFreeChart</a></p>
  
  <p>I have used 4 XYSeries for my first hysteresis loop and another four for the second hysteresis loop.</p>
  
  <p>If i turn on the legend </p>
  
  <pre><code> JFreeChart chart = ChartFactory.createXYLineChart(
  "Hysteresis Plot", // chart title
  "Pounds(lb)", // domain axis label
  "Movement(inch)", // range axis label
  dataset, // data
  PlotOrientation.VERTICAL, // orientation
  true, // include legend
  true, // tooltips
  false // urls
  );
  </code></pre>
  
  <p>it appears like this :</p>
  
  <p><img src="https://i.stack.imgur.com/9qPWO.png" alt="enter image description here"></p>
  
  <p>I just want to show that blue is my first hysteresis loop and red is my second hysteresis loop, which I have added as subtitle in the first pic as workaround. Can someone guide how I can add manual legends which indicate blue as first loop and red as second.</p>
  
  <p>Thanks</p>