title: Rescaling colors palette in r
body: <p>In R i have a cloud of data around zero ,and some data around 1, i want to "rescale" my heat colors to distinguish lower numbers.This has to be done in a rainbow way, i don't want "discrete colors".I tried with breaks in image.plot but it doesn't work.</p>
  
  <blockquote>
  <pre><code>  image.plot(X,Y,as.matrix(mymatrix),col=heat.colors(800),asp=1,scale="none")
  </code></pre>
  </blockquote>
  
  <p>I tried :</p>
  
  <pre><code>lowerbreak=seq(min(values),quantile2,len=80)
    highbreak=seq(quantile2+0.0000000001,max(values),len=20)
    break=c(lowerbreak,highbreak)
    ii &lt;- cut(values, breaks = break, 
              include.lowest = TRUE)
  
    colors &lt;- colorRampPalette(c("lightblue", "blue"))(99)[ii]
  </code></pre>