plot() is a base graphics function. You can not use it in a Lattice
context. And also you can not add to a Lattice plot as you tried to
do: you need to use a panel function, or call trellis.focus(). I
suggest you read the Lattice documentation.
This is one way to do it:
library(sp)
xyplot(lat ~
Hi there,
I tried to add a coastline that is imported from a shapefile to a xyplot of
sample points, but I got an error message.
> library(lattice)
> library(maptools)
> xyplot(mud$lat~mud$long, asp="iso", type="p", pch=1, cex=0.01, xlab="",
ylab="")
>
> plot(coastline, add=T)
Error in
On Thu, 1 Nov 2007, Markus Loecher wrote:
> Dear all,
> I understand that plot.Map (the default method for plotting shape objects) is
> deprecated, however I have not found a working method converting my shape
> file into either a polylist or sp class.
> I tried the following
> p2roads <- read
Dear all,
I understand that plot.Map (the default method for plotting shape objects) is
deprecated, however I have not found a working method converting my shape file
into either a polylist or sp class.
I tried the following
p2roads <- read.shape("sf.shp")
SF.map <- Map2poly(p2roads)
where