title: How do i control the sequence of records in a bar plot with matplotlib with Text?
body: <p>I have a data file that consists of several data points, that i would like to plot in a particular order. Here is the example data file:</p>
  
  <pre><code>cop   94.0528    313     441
  cpr   225.172    726     747
  ent   444.786    926     939
  fsh   256.038    743     754
  fsp   43.7764    340     356
  pbp   343.708    825     834
  rho   426.497    858     886
  sca   342.431    427     872
  </code></pre>
  
  <p>I am currently plotting those just below each other in the way i set the example. How can i change the order of those data records within my python script to a specified order? I already tried to work this into an array. in this question here: <a href="https://stackoverflow.com/questions/12035603/how-do-i-control-the-sequence-of-records-in-a-bar-plot-with-matplotlib">How do i control the sequence of records in a bar plot with matplotlib?</a> </p>
  
  <p>So the next question i have from here on out is, can i do the exact same thing, but using a text-based sorting aaray?</p>
  
  <p>So what i would put in would be something like this:</p>
  
  <pre><code>posarray = (crp, 2), (cop,1)
  </code></pre>
  
  <p>edit: The posarray would denote the position of the record with the text in posarray[0] in the outputarray. The crp would end up at the second position, cop at the first and so on.</p>
  
  <p>and what it would give me would be </p>
  
  <pre><code>cop   94.0528    313     441
  cpr   225.172    726     747
  </code></pre>
  
  <p>the best thing would be using some kind of insert, so that if i forget to mention an item in the sorting array it would sink to the bottom.</p>