Hello:
I am trying to achieve something similar to what is presented in figure 
21 on the R spatial project gallery: http://rspatial.r-forge.r-project.org/
A comparison between two maps with a single legend on the right.
However, in my case I don't think I can use lattice for two reasons:
- my two maps do not have the exact same geometry (at each Census cycle 
the geometries change slightly)
- I am overlaying a choropleth and a proportional point layers on each 
map and I have not figured out how to do this using lattice.

So far, I have just used plot() and I have generated my two maps side by 
side with a code along those lines:
(with map_view_poly being a SpatialPolygonsDataFrame and map_view_point 
is a SpatialPointsDataFrame and the other variables calculated 
appropriately)

layout(matrix(c(1:2),2,1))
plot(map_view_poly,col=jenksColours)
plot(map_view_point,pch=16,col="blue",bg="blue",cex=perceptualSize,add=TRUE)
plot(map_view_poly2,col=jenksColours)
plot(map_view_point2,pch=16,col="blue",bg="blue",cex=perceptualSize,add=TRUE)

Then I used the legend() function twice to generate the two parts of the 
legend (one for the point layer and one for the polygon layer) which 
generates a nice legend. However, I cannot figure out how to place it 
nicely similarly to what it is done by default with lattice (see figure 
21). With the basic placement, it always end up too close to one (or 
even on top) of the two maps and creating a third spot in the layout 
specially for the legend takes too much space.

What function should I play with to try to place the legend in a spot 
like on figure 21 without taking all the space?

Thank you,

Vivien

	[[alternative HTML version deleted]]

