Skip to content
Prev 244310 / 398506 Next

How can I change the longitude scale on the plotMap() PBSmapping package

You cannot, plotMap() decides things for you. For more flexibility than:

polys <- data.frame(PID=rep(1,4), POS=1:4, X=c(0,1,1,0), Y=c(0,0,1,1))
plotMap(polys, xlim=c(-.5,1.5), ylim=c(-.5,1.5), projection="LL")

from the help page, consider trying:

library(sp)
library(maptools)
sp_polys <- PolySet2SpatialPolygons(as.PolySet(polys, projection="LL"),
close_polys=TRUE)
plot(sp_polys, xlim=c(-.5,1.5), ylim=c(-.5,1.5), axes=TRUE)

Also consider following up on the R-sig-geo list.

Roger
Fabio Caltabellotta wrote:
-----
Roger Bivand
Economic Geography Section
Department of Economics
Norwegian School of Economics and Business Administration
Helleveien 30
N-5045 Bergen, Norway