title: How do I control a heatmap with lattice and levelplot?
body: <p>This morning I started to find a solution to produce a heatmap from a table of pair-wise values that I have here. I found that the lattice package offers <code>levelplots</code> which seem like what I was after. When I managed to bring my data into the right format, I played with <code>levelplot</code>. The default colour theme does not produce what I'm after and I found a grey scale solution on the web. However, controlling more of the plot is a bit outside my scope for now. I don't use R very often and am not very familiar yet with many of the deeper data structures .</p>
  
  <p>My current command is:</p>
  
  <pre><code>library("lattice")
  matrix &lt;- as.matrix(rev(read.table("inputfile",header=T,row.names=c(&lt;list of ten names&gt;))))
  levelplot(matrix,col.regions = grey(100:0/100))
  </code></pre>
  
  <p>This is the output of dput matrix:</p>
  
  <pre>
  structure(c("937.5", "652.5", "1066.5", "787.5", "229.5", "115.5", 
  "787.5", "763.5", "415.5", "N/A", "1483.5", "1360.5", "1858.5", 
  "1309.5", "478.5", "322.5", "1375.5", "1588.5", "N/A", "1759.5", 
  "643.5", "904.5", "1189.5", "712.5", "256.5", "154.5", "829.5", 
  "N/A", "403.5", "1231.5", "808.5", "1096.5", "1195.5", "913.5", 
  "292.5", "187.5", "N/A", "1147.5", "478.5", "1192.5", "6712.5", 
  "6373.5", "6517.5", "6058.5", "4555.5", "N/A", "6394.5", "7357.5", 
  "6214.5", "6835.5", "3412.5", "3991.5", "3814.5", "3793.5", "N/A", 
  "1327.5", "3994.5", "3808.5", "3307.5", "4618.5", "1261.5", "1261.5", 
  "1162.5", "N/A", "310.5", "220.5", "1195.5", "1639.5", "574.5", 
  "1732.5", "871.5", "847.5", "N/A", "610.5", "262.5", "172.5", 
  "943.5", "985.5", "448.5", "1525.5", "940.5", "N/A", "1105.5", 
  "829.5", "292.5", "160.5", "961.5", "1198.5", "538.5", "1495.5", 
  "N/A", "832.5", "1009.5", "880.5", "280.5", "196.5", "952.5", 
  "1357.5", "550.5", "1456.5"), .Dim = c(10L, 10L), .Dimnames = list(
      c("NA_Pacific", "NA_Central", "NA_Atlantic", "Greenland", 
      "EU_NW", "EU_WM", "EU_BS.EM", "Asia_SW", "Asia_Central", 
      "Asia_East"), c("Asia_East", "Asia_Central", "Asia_SW", "EU_BS.EM", 
      "EU_WM", "EU_NW", "Greenland", "NA_Atlantic", "NA_Central", 
      "NA_Pacific")))
  </pre>
  
  <ol>
  <li><p>This creates almost what I would
  like to achieve. But the grey is
  ugly. How do I change it to, say,
  blue? Substituting grey for blue
  does not work...</p></li>
  <li><p>Further, it prints labels to the
  ticks as I specified them in my
  input table. This works for the
  y-axis, but not the x-axis. How can
  I recycle the y-axis ticks to print
  them to the x-axis ticks (rotated by
  90 degrees)?</p></li>
  <li><p>Finally, there is a tiny little
  bit of white space along the x-axis
  (on top and bottom). While this is
  no real problem, it would however be
  just nice to eliminate it.</p></li>
  </ol>
  
  <p>I hope at least some of the questions can be resolved. Thanks in advance.</p>