[R-sig-Geo] Question with spplot for publication
Ziyu Ma
paul.ziyu.ma at gmail.com
Fri Aug 22 09:15:28 CEST 2014
Dear all,
I miss you guys from GEOSTAT Bergen!
Here's my question: I want to make a map directly from R for my manuscript,
using a raster layer overlaid with spatial polygons as outlines.
Please see the attachment for what I mean: http://1drv.ms/1sYYqPg
I did the upper plot in the attachement using these codes:
NRI = stack(NRI.A,NRI.G) # NRI.A and NRI.G are raster layer names
names(NRI) = c("Angiosperms NRI", "Gymnosperms NRI")
spplot(NRI)
I need to put two rasters together in spplot because I want to use the same
legend scale.
I also want to add the outlines, so that it can look like the Photoshopped
plot in the attachment.
Normally, if not using spplot, I can do this:
plot(NRI.G) # NRI.G is a raster layer
plot(Outlines) # Outlines is a SpatialPolygons object
But how can I do it for both panels in spplot? I think the panels and
titles in spplot are very neat, so it is preferred if there is a straight
forward way to tweak the settings.
Or should I use other functions than spplot? (e.g. try coding the color
scheme of the 2 plots and place them side by side?)
Thank you for the help. I really appreciate those who made R able to
produce publication quality plots.
Cheers,
Ma
Ziyu Ma
PhD Student
Ecoinformatics & Biodiversity,
Department of Bioscience, Aarhus University
Ny Munkegade 114, DK-8000 Aarhus C, Denmark
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list