What is plot.new? How can I fix this data or add plot.new so it works?
> library(maps)
> library(splancs)
> area = 6*4
> lambda = 1.5
> N = rpois(1,lambda*area)
> u = runif(N,-2,4)
> v = runif(N,0,4)
> plot(u,v,asp=1)
> h = chull(u,v)
> h = c(h,h[1])
> plot(u[h],v[h],"1",asp=1)
Error in plot.xy(xy, type, ...) : invalid plot type
'1'> plot(u[h],v[h],"l",asp=1)
> points(u,v)
Error in plot.xy(xy.coords(x, y), type = type, ...) :
plot.new has not been called yet> pts=as.points(u,v)
> pointmap(pts)
> hullpoly=as.points(u[h],v[h])
> polymap(hullpolly,add=TRUE)
Error in xy.coords(x, y) : object 'hullpolly' not
found> help(polymap)
> help(plot.net)
No documentation for 'plot.net' in specified packages and libraries:
you could try '??plot.net'> help(plot.new)
> plot(u[h],v[h],"l",asp=1)
> plot.new(u,v)
Error in plot.new(u, v) : unused argument(s) (u, v)> plot.new()
> points(u,v)
Error in plot.xy(xy.coords(x, y), type = type, ...) :
plot.new has not been called yet> plot.new(u,v)
Error in plot.new(u, v) : unused argument(s) (u, v)> plot.new(xy.coords(x,y))
Error in plot.new(xy.coords(x, y)) : unused argument(s) (xy.coords(x,
y))> plot.new(uv.coords(u,v))
Error in plot.new(uv.coords(u, v)) : unused argument(s) (uv.coords(u,
v))> plot.new <- function()
+ {}> { }
NULL> plot.new <- function()
+ { }> { }
NULL> { for }
Error: unexpected '}' in "{ for }"> area = 60*20
> lambda = 2
> N = rpois(1,lambda*area)
> u = runif(N,20,40)
> v = runif(N,-10,10)
> plot(u,v,asp=1)
>
> plot(u,v,asp=1)
> u = runif(N,20,40)
> v = runif(N,-10,10)
> plot(u,v,asp=1)
>
> plot(u,v,asp=1)
> u = runif(N,20,40)
> v = runif(N,-10,10)
> plot(u,v,asp=1)
> u = runif(N,20,40)
> v = runif(N,-10,10)
> plot(u,v,asp=1)
> h = chull(u,v)
> h = c(h,h[1])
> plot(u[h],v[h],"l",asp=1)
> points(u,v)
Error in plot.xy(xy.coords(x, y), type = type, ...) :
plot.new has not been called yet> pts=as.points(u,v)
> pointmap(pts)
> hullpoly=as.points(u[h],v[h])
> polymap(hullpolly,add=TRUE)
Error in xy.coords(x, y) : object 'hullpolly' not found
No help files found matching ‘hullpoly’ using fuzzy
matching> pointmap(as.points(hullpoly), add=TRUE)
Error in plot.xy(xy.coords(x, y), type = type, ...) :
plot.new has not been called yet> hullpoly=as.points(u[h],v[h])
> polymap(hullpoly$poly, add=TRUE)
Error in hullpoly$poly : $ operator is invalid for atomic
vectors> polymap(hullpoly,add=TRUE)
Error in polygon(poly, ...) : plot.new has not been called
yet> plot.new()
NULL> par(new=TRUE)
Warning message:
In par(new = TRUE) : calling par(new=TRUE) with no plot> plot.new()
NULL> par(new=TRUE)
Warning message:
In par(new = TRUE) : calling par(new=TRUE) with no plot> new.u=runif(50,20,40)
> new.v=ruinf(50,-10,10)
Error: could not find function "ruinf"> new.v=runif(50,-10,10)
> pts.in=pip(as.points(new.u,new.v),hullpoly,out=FALSE)
> pointmap(pts.in,col="red",add=TRUE)
Error in plot.xy(xy.coords(x, y), type = type, ...) :
plot.new has not been called yet
[[alternative HTML version deleted]]