title: How to reverse the Y axis in a contourplot using the Lattice package
body: <p>I would like to produce a contourplot using the lattice package in which the y axis starts at the top and goes to the bottom (i.e. smallest value at top, largest value at bottom). 
  If I change the following:</p>
  
  <pre><code>contourplot(Male ~ Age * Year, data=this.ds)
  </code></pre>
  
  <p>to </p>
  
  <pre><code>contourplot(Male ~ Age * rev(Year), data=this.ds)
  </code></pre>
  
  <p>Then the graph is plotted correctly but the y axis tickmark labels are not reversed. (i.e. still start at the bottom and go to the top.)  - (See end of message for fully reproducible example.)</p>
  
  <p>I think the answer involves using the 'scales' list object (so I think this has a one line solution) but am not sure what it is.       </p>
  
  <p>Help much appreciated, Jon</p>
  
  <p>Fully reproducible example:</p>
  
  <pre><code>library(lattice)
  attach(environmental)
  ozo.m &lt;- loess((ozone^(1/3)) ~ wind * temperature * radiation,
             parametric = c("radiation", "wind"), span = 1, degree = 2)
  w.marginal &lt;- seq(min(wind), max(wind), length.out = 50)
  t.marginal &lt;- seq(min(temperature), max(temperature), length.out = 50)
  r.marginal &lt;- seq(min(radiation), max(radiation), length.out = 4) 
  wtr.marginal &lt;- list(wind = w.marginal, temperature = t.marginal,
                                radiation = r.marginal) 
  grid &lt;- expand.grid(wtr.marginal) 
  grid[, "fit"] &lt;- c(predict(ozo.m, grid))
  </code></pre>
  
  <p>Plotting as usual:</p>
  
  <pre><code>contourplot(fit ~ wind * temperature, data = grid,
                cuts = 10, region = TRUE,
                xlab = "Wind Speed (mph)",
                ylab = "Temperature (F)",
                main = "Cube Root Ozone (cube root ppb)")
  </code></pre>
  
  <p>Using the rev() function on temperature:</p>
  
  <pre><code>contourplot(fit ~ wind * rev(temperature), data = grid,
              cuts = 10, region = TRUE,
              xlab = "Wind Speed (mph)",
              ylab = "Temperature (F)",
              main = "Cube Root Ozone (cube root ppb)")
  
  detach()
  </code></pre>
  
  <p>I would like it so the y (temperature) axis labels are reversed as well as as the y axis values. (i.e. it reads 90, 80, 70, 60 going bottom to top rather than 60, 70, 80, 90)</p>