[R-sig-Geo] contour lines on a plot

Maxime Pauwels Maxime.Pauwels at univ-lille1.fr
Mon Jan 19 18:37:27 CET 2009


Dear Virgilio,

I think you're right. Unfortunately, I am not familiar enough with the 
analysis of spatial data to avoid such conflict.
Do you know wath function I should use to generate contour before 
conversion.
I tried contour but it didn't work:

contour<-ContourLines2SLDF(contour(p, nlevels=2))
Erreur dans ContourLines2SLDF(contour(p, nlevels = 2)) : cL too short
De plus : Warning message:
In plot.window(xlim = xlim, ylim = ylim, asp = asp, ...) :
"nlevels" is not a graphical parameter

Many thanks,

max



Virgilio Gomez Rubio a écrit :
> Dear Maxime,
>
> I have not been able to reproduce your example because I lack your data
> file (file.txt). However, I believe that the problem is at
>
>   
>> spplot(p,zcol="K1.pred",col.regions=gray(0:100/100), cuts=40, 
>> sp.layout=list(pts), pretty=T)
>> contour(p, add=T, nlevels=2)
>>     
>
> You are combining lattice graphics (spplot()) and 'traditional' graphics
> (contour()). A good alternative here is to pass the contour lines  to
> spplot via the sp.layout parameter. You can use ContourLines2SLDF to
> convert contour lines to a SpatialLinesDataFrame.
>
> Hope this helps.
>
> Virgilio
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>   


-- 
Maxime Pauwels
Researcher ID: http://www.researcherid.com/rid/A-1745-2009

Laboratoire de Génétique et Evolution des Populations Végétales
http://www.univ-lille1.fr/gepv
Tel  : +33 3 20 43 40 76
Fax  : +33 3 20 43 69 79
			
«Impose ta chance, serre ton bonheur et va vers ton risque. A te regarder, ils s’habitueront.»
René Char




More information about the R-sig-Geo mailing list