title: Sorting the handles and labels in python legend, based on part of the label strings
body: <p>I've plotted some data on a chart in python and then used </p>
  
  <p>handles, labels = ax0_1.get_legend_handles_labels()</p>
  
  <p>to get the labels and handles.  The labels I get are ordered like this:</p>
  
  <p>A1 01-01-01 01 ABC <br>
  A1 01-01-01 01 ABCD<br>
  A1 01-01-01 01 ABCDE<br>
  A1 01-01-01 02 ABC<br>
  A1 01-01-01 02 ABCD<br>
  A1 01-01-01 02 ABCDE<br></p>
  
  <p>... but what I need is to sort the labels <em>AND</em> the corresponding handles so that the order would be this:</p>
  
  <p>A1 01-01-01 01 ABC<br> 
  A1 01-01-01 02 ABC<br>
  A1 01-01-01 01 ABCD<br>
  A1 01-01-01 02 ABCD<br>
  A1 01-01-01 01 ABCDE<br>
  A1 01-01-01 02 ABCDE<br></p>
  
  <p>I've tried several things, but so far ended up with only a headache.<br>
  Anybody know how this be done ?  </p>