title: Creating a colour gradient around zero in filled.contour
body: <p>I am new to R and am struggling to find an answer to what I thought would be a relatively common question. I am creating a world map of a variable using filled.contour. For example:</p>
  
  <pre><code>z=matrix(rnorm(7008),nrow=96)
  x=seq(-176.25,180, by=3.75)
  y=seq(-90,90, by=2.5)
  filled.contour(x,y,z, plot.axes={axis(1); axis(2); map(add=TRUE, interior=FALSE)} )
  </code></pre>
  
  <p>In which x &amp; y are longitude and latitude, and z is a data matrix. I have spent time applying my own colours and levels, however I want to have a gradient of colour with white assigned as zero. With negative number grading to dark blue and positive to dark red through green and yellow. </p>
  
  <p>I have tried to use the color.scale function from the 'plotrix' package </p>
  
  <pre><code>cellcol=matrix(rep("#000000",7008),nrow=96) # replicating the size of my matrix z
  cellcol[z&gt;0]=color.scale(z[z&gt;0], c(0,1,1),c(1,1,0),0) # values above zero grading to red 
  cellcol[z&lt;0]=color.scale(z[z&lt;0], 0, 0,c(0,1)) # values below zero grading to blue
  </code></pre>
  
  <p>However now I am stuck. Is this the best way to go about doing this? If so how do I input this into the the filled.contour code above? I'm sure it is simple yet can't get it to work. </p>
  
  <p>Thanks for any help in advance. </p>