scalebar(d, xy = NULL, type = "line", divs = 2, below = "",
lonlat = NULL, label, adj=c(0.5, -0.5), lwd = 2, ...)
xy=click()
to make this interactiveTRUE
indicates if the plot is using longitude/latitude coordinates. If NULL
this is guessed from the plot's coordinatesplot
f <- system.file("external/test.grd", package="raster")
r <- raster(f)
plot(r)
scalebar(1000)
scalebar(1000, xy=c(178000, 333500), type='bar', divs=4)
Run the code above in your browser using DataLab