title: R: Combining lattice dotplots and ordering data
body: <p>To create my dotplot I am using the following text file:</p>
  
  <pre><code> ## filename  difference    RMSD
      1bso.pdb         1.0  0.5645
   1cj51.9.pdb         2.0  3.5596
   1cj51.1.pdb         3.0  3.5573
      3qzj.pdb         3.0  0.8302
      1bsy.pdb         4.0  0.5387
   1cj51.5.pdb         8.0  3.9864
      2gj5.pdb        10.0  0.8446
  1cj51.10.pdb        11.0  3.5914
      1uz2.pdb        12.0  1.7741
      2blg.pdb        12.0  0.5449
  </code></pre>
  
  <p>The 1st column is the file name, second column in the difference and the 3rd is the RMSD. The data was ordered so the difference is ascending. </p>
  
  <p>I can create individual dot plots using the following commands:</p>
  
  <pre><code># This plots the difference
  library(lattice)
  data &lt;- read.table("~/Documents/Beta_test_area/pa.txt", header=F, sep="\t")
  dotplot(V1~V2, xlim=c(0, 150), xlab="CCS Difference", data=data)
  
  # This plots the RMSD
  dotplot(V1~V3, xlim=c(0, 5), xlab="RMSD", data=data)
  </code></pre>
  
  <p>On the graph the data on the Y axis is ordered by file name and the data is not plotted as in the text file, how can I order the Y axis to mirror the order in the data file?</p>
  
  <p>The other problem I am having is combining the plots. How can I have the make the plots so that I have the plots in one row but over two columns. With the difference plot on the left and the RMSD plot on the right.</p>