title: how to change the sequence of the legend
body: <p>I want to change the sequence of the legend.</p>
  
  <p>See the figure.  I want the sequence to be: green and <code>data2</code>, blue and <code>data3</code>, black and <code>data4</code>, red and <code>data1</code>.</p>
  
  <p>Could anyone give a demo?</p>
  
  <p><img src="https://i.stack.imgur.com/hPvrh.png" alt="enter image description here"></p>