[R-sig-Geo] layout.north.arrow not pointing to actual north
Matthew Vavrek
matthew at matthewvavrek.com
Mon Aug 29 04:24:43 CEST 2011
I'm not sure if I'm going about this the right way, but I've been trying
to create some relatively basic base maps in R (I've found the export
formats better than the GIS I use) using the plot function for a
SpatialLines object (spplot seemed like too much for my purposes, as I
just want a map showing my location). I'm plotting a projected map, and
the latitudes/longitudes are not parallel with the margins of the plot,
as it uses the same projection as a larger map and I'm trying to keep
the same view between them. However, when I plot the north arrow using
layout.north.arrow() it gives me a north arrow that is lined up with the
margin of the plot, not true north. the code I'm using looks like this:
plot(projected.map)
SpatialPolygonsRescale(layout.north.arrow(1), offset =
c(2490000,4930000), scale = 40000, plot.grid=F)
The scale bar using layout.scale.bar() looks OK though, although that
might just be misleading and actually needs to be adjusted as well. Is
there anywhere that layout.north.arrow is actually explained, or
SpatialPolygonsRescale? I also have no idea if what I'm doing even makes
much sense, as I don't know if you can mix lattice and normal plot items.
Thanks
Matthew
More information about the R-sig-Geo
mailing list