title: How to edit the palette bar in the R function spplot?
body: <p>I am using the R package GWmodel. While plotting the output of the GWR I found myself unable to edit the side bar in the ssplot function.</p>
  
  <p>The few lines of code I'm using(data is already in package) will be sufficient. You only need to install the GWmodel library:</p>
  
  <pre><code>library(GWmodel)
  data("DubVoter")
  
  bw.gwr.1 &lt;- bw.gwr(GenEl2004 ~ DiffAdd + LARent + SC1 + Unempl + LowEduc + Age18_24 + Age25_44 + Age45_64, data = Dub.voter, approach = "CV", kernel = "gaussian", adaptive = FALSE)
  
  gwr.res &lt;- gwr.basic(GenEl2004 ~ DiffAdd + LARent + SC1 + Unempl + LowEduc + Age18_24 + Age25_44 + Age45_64, data = Dub.voter, bw = bw.gwr.1,  kernel = "gaussian", adaptive = FALSE, F123.test = TRUE)
  
  
  
  Greens &lt;- c("#238B45","#74C476","#BAE4B3","#EDF8E9")
  
  spplot(gwr.res$SDF, "Unempl", cuts = 4, at = c(fivenum(gwr.res$SDF$Unempl)), col.regions = Greens)
  </code></pre>
  
  <p>the outcome looks like:</p>
  
  <p><a href="https://i.stack.imgur.com/aBIHd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aBIHd.png" alt="enter image description here"></a></p>
  
  <p>As you can see in the spplot function, the parameter at is given the value c(fivenum(gwr.res$SDF$Unempl)) which would correspond to min, 1st quartile, median, 3rd quartile, max of the values in gwr.res$SDF$Unempl. Looking at the graph, we can see that the colors respect this partition into 4 classes (using the arguments cuts = 4 at = c(fivenum(gwr.res$SDF$Unempl))). </p>
  
  <p>What I would like to do is to edit the side bar with the palette and add replace 6,4,2,0,-2 with the values in c(fivenum(gwr.res$SDF$Unempl)) which are:</p>
  
  <p>-2.427, -0.916, -0. 6.706, -0.494, 7.566</p>