title: Using ggplot to plot multiple lines along the x-axis, coloured by their group but remaining seperate
body: <p>I want to use ggplot to create a line graph, with the values of each 'Molecule' represented by a different line. I want to use 'Family' to colour each line. I am having issues with this and can't seem to represent the individual values as separate lines, nor colour them based on their family.</p>
  <pre><code>df.long = melt(df, id.vars = c(&quot;Molecule&quot;, &quot;Family&quot;), measure.vars = c(3:7))
  ggplot(df.long, aes(variable, value)) + geom_line(aes(colour = Molecule)
  </code></pre>
  <p>I end up plotting something like this:</p>
  <p><a href="https://i.stack.imgur.com/Mz3HO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Mz3HO.png" alt="enter image description here" /></a></p>
  <p>If someone could help me work this out, I would appreciate it.</p>
  <p>This is how my data is organized, in wide format:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Molecule</th>
  <th>Family</th>
  <th>Pos1</th>
  <th>Pos2</th>
  <th>Pos3</th>
  <th>Pos4</th>
  <th>Pos5</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>A</td>
  <td>i</td>
  <td>2.178</td>
  <td>1.289</td>
  <td>0.656</td>
  <td>0.956</td>
  <td>0.711</td>
  </tr>
  <tr>
  <td>B</td>
  <td>ii</td>
  <td>1.478</td>
  <td>0.889</td>
  <td>0.578</td>
  <td>0.689</td>
  <td>0.444</td>
  </tr>
  <tr>
  <td>C</td>
  <td>ii</td>
  <td>1.389</td>
  <td>1.078</td>
  <td>1.189</td>
  <td>0.944</td>
  <td>1.844</td>
  </tr>
  </tbody>
  </table>
  </div>