[R-sig-Geo] overlay contour lines with labels over spplot with color regions?
Martin Ivanov
martin.ivanov at ifg.uni-tuebingen.de
Fri Jul 20 19:22:39 CEST 2012
Dear R users,
I have the following problem. I plot a SpatialPixelsDataFrame object
with spplot and I need to add a contourplot
of another spatial variable. To be more precise, I plot the
SpatialPixelsDataFrame of the mean precipitation over Germany with
coloured regions and I want to overlay the isolines of the 500, 1000 and
1500 m height above sea level. Of course I can plot the lines as
SpatialLines using the sp.layout argument to spplot, but so I lose the
labels on the lines. And I want the height above sea level to be
labelled just as it is labelled in a contour plot. Is it possible to
achieve that with lattice?
I am still new to lattice, so I beg Your excuse in case I am asking
something trivial. I googled a lot and tried a lot of things, but none
worked. I tried with contour, it does work with Spatial objects, but
unfortunately contour does not seem work with lattice. And the lattice
equivalent contourplot does not recognise Spatial objects.
I am already out of ideas. I am looking forward to Your replies. Any
suggestions will be appreciated.
Best regards,
Martin
--
Dr. Martin Ivanov
Eberhard-Karls-Universität Tübingen
Mathematisch-Naturwissenschaftliche Fakultät
Fachbereich Geowissenschaften
Water & Earth System Science (WESS)
Keplerstraße 17, 72074 Tübingen, Deutschland
Tel. +4970712975023
More information about the R-sig-Geo
mailing list