[R-sig-Geo] Problem of legend using spplot in R

baremma2002 baremma2002 at yahoo.fr
Wed Oct 23 13:53:07 CEST 2013


Dear users,

How can I make disappeared only the axes of the map and not the barline in
the bar legend using spplot in R? 

The code is like:

library(sp)
data(meuse)
coordinates(meuse) = ~x+y
data(meuse.grid)
coordinates(meuse.grid) = ~x+y
gridded(meuse.grid) = TRUE

lzn.vgm = variogram(log(zinc)~1, meuse)
lzn.fit = fit.variogram(lzn.vgm, model = vgm(1, "Sph", 900, 1))
lzn.kriged = krige(log(zinc)~1, meuse, meuse.grid, model = lzn.fit)

spplot(lzn.kriged,"var1.pred")

The map has a legend with predicted values.

Using this:

spplot(lzn.kriged,"var1.pred",par.settings=list(axis.line=list(col='transparent')))

the axes of the map and the right bar line for the legend disappear.

How can I perform the R code in order to get only the black bar line on the
legend (on the right of the map)? In other words, I would like to make
disappeared only the axes of the map but not the black line of the bar
legend.

Thank you very much for your answer.

Emmanuel



--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Problem-of-legend-using-spplot-in-R-tp7584940.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list