Thanks so much for that elegant solution... it works extremely well.
I'm now trying to add lines, points and polygons to show transects,
locations of the original data points and the bounding polygon of the study
area. Presumably I can use panel.polygonsplot, panel.pointsplot for this?
--
Vie
You are plotting the entire lattice plot (including axes, margins etc)
in the grid viewport. What you want to do is to call the panel
function, panel.levelplot(), instead.
However, why not just
mm <- map('worldHires', plot = FALSE)
levelplot(z~x+y,xyz, mm = mm, panel = function(..., mm) {
pan
You don't have to use map() to draw the map.
m <- map(..., plot = FALSE)
xyplot(y ~ x, m, type = "l", aspect = "iso",
par.settings = list(axis.line = list(col = "transparent")))
or inside a panel function, assuming appropriate scales:
panel.xyplot(m$x, m$y, ...)
On 23 April 2010 04:38, David
Thanks for those pointers making some progress now
The following will put the levelplot on to the map, but the not with the
co-ordinates aligned...
The level plot appears on a slightly larger scale compared to the underlying
map.
In both the map and levelplot, the coordinates are in lon, lat
On Apr 22, 2010, at 2:24 PM, Kevin Wright wrote:
Mixing base/lattice graphics can be tricky, but is possible.
http://www.bioconductor.org/CRAN/web/packages/gridBase/vignettes/gridBase.pdf
That could be quite useful in the future. Thanks for that.
Also, did you look at Chapter 13 of the la
Mixing base/lattice graphics can be tricky, but is possible.
http://www.bioconductor.org/CRAN/web/packages/gridBase/vignettes/gridBase.pdf
Also, did you look at Chapter 13 of the lattice book?
http://lmdvr.r-forge.r-project.org/figures/figures.html
Kevin
On Wed, Apr 21, 2010 at 2:08 PM, David
On Apr 22, 2010, at 5:33 AM, Simon Goodman wrote:
Thanks for the suggestions Unfortunately contour won't in this
case as it
expects the x,y values to be in an ascending sequence.
?order
David Winsemius, MD
West Hartford, CT
__
R-help@r
Thanks for the suggestions Unfortunately contour won't in this case as it
expects the x,y values to be in an ascending sequence.
--
View this message in context:
http://r.789695.n4.nabble.com/overlaying-a-levelplot-on-a-map-plot-tp2019419p2020292.html
Sent from the R help mailing list ar
Try using contour() instead of levelplot. See the examples
in help('contour') for how to add contour lines to an
existing plot.
-Peter Ehlers
On 2010-04-21 13:08, David Winsemius wrote:
On Apr 21, 2010, at 2:27 PM, Simon Goodman wrote:
I've generated a levelplot showing the density distrib
On Apr 21, 2010, at 2:27 PM, Simon Goodman wrote:
I've generated a levelplot showing the density distribution of a
species
derived from survey transects, with lon, lat co-ordinates.
I'd like to overlay this on a map of the study region specified by:
map('worldHires', xlim = range(mlon), y
10 matches
Mail list logo