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

José Manuel Blanco Moreno jmblanco at ub.edu
Mon Jan 19 22:19:20 CET 2009


Just a doubt... there seems that the contours are not shifted but 
"mirrored" (flipped) along an horizontal line?


Virgilio Gomez Rubio escribió:
> Hi,
>
> El lun, 19-01-2009 a las 18:37 +0100, Maxime Pauwels escribió:
>   
>> 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.
>>     
>
> This example may help:
>
>
> library(maptools)
>
> res <- ContourLines2SLDF(contourLines(volcano))
>
> grd<-GridTopology(c(0,0), 1/dim(volcano), dim(volcano))
> spvolcano<-SpatialGridDataFrame(grd,
> data.frame(altitude=as.vector(volcano)))
>
> spplot(spvolcano, sp.layout=list(list("sp.lines", res)) )
>
> There is something wrong in the way I have defined the grid topology and
> the contour lines are shifted north, but you will get the idea. You
> could also add labels to the contour lines.
>
> Best,
>
> Virgilio
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>   


-- 
---------------------------------------
José M. Blanco Moreno

Dept. de Biologia Vegetal (Botànica)
Universitat de Barcelona
Av. Diagonal 645 
08028 Barcelona SPAIN
---------------------------------------

phone: (+34) 934 039 863
fax: (+34) 934 112 842
e-mail: jmblanco at ub.edu 




More information about the R-sig-Geo mailing list