Skip to content
Prev 20485 / 29559 Next

Scaling the scale bar

Alex, thanks for the reproducible example -- please try:

 bb = bbox(States)
 Scale  <- list("SpatialPolygonsRescale",
           layout.scale.bar(),
           offset = c(bb[1,1] + 20000, bb[2,1] + 20000),
           scale  = 100000,
           fill   = c("white", "black"))
 l4 = list("sp.text", c(bb[1,1] + 20000, bb[2,1] + 10000), "0")
 l5 = list("sp.text", c(bb[1,1] + 120000, bb[2,1] + 10000), "100 km")
 spplot(States, "GEN", sp.layout = list(Scale, l4, l5))

For the next time, send a clean script (without the > and + in it), and
remember that as path separator "\\" only works on some operating
systems, "/" on all (I believe).
On 02/27/2014 12:18 PM, Alexander Sommer wrote: