Hi everybody, I am trying to add a polygon from my region of interest to a
bubble plot of the residuals of a model, but I don“t know how can I do this.
My code is:

a=ko.cv$krige.cv_output$residual #Residuals from "autoKrige.cv" function of
package automap.
a=data.frame(coords,a)
coordinates(a)=~x+y
bubble(a, "a",scales=xyplot(y~x,as.data.frame(a))) #Here we have the normal
bubble plot

I“ve tried to add a polygon from my region of interest with the function
"panel.polygon", but it tries to convert the points of coordinates into a
polygon. My code is:

Limite=readShapePoly("F:/Rancheria/Rancheria/Limite_Rancheria.shp") #Region
of interest
bubble(a,"a",scales=xyplot(y~x,as.data.frame(a)),panel = function(Limite,
...) {
panel.polygon(x,...);
panel.grid(h=-1, v=-1, col="darkgrey")})

Also I tried with the function "lpolygon" but I can“t obtain any plot.

If someone can help with this, or with an other idea I“ll be so grateful.
Thanks in advance and my best regards.


-- 
Jaime Burbano Girón
Departamento de Ecologķa y Territorio
Pontificia Universidad Javeriana
Bogotį - Colombia
(571) 3208320 Ext. 4836

	[[alternative HTML version deleted]]

