[R] Plotting panels at arbitrary places on a map, rather than on a lattice
Roger Bivand
Roger.Bivand at nhh.no
Fri Oct 1 19:59:58 CEST 2004
On Fri, 1 Oct 2004, Michael Dewey wrote:
> I think it is easiest to describe what I want in terms of the concrete
> problem I have.
>
> I have data from a number of countries in each of which a sample of
> people was interviewed. In presenting the results in a forthcoming
> collaborative publication much emphasis will be placed on the
> multi-centre nature of the study. Although I suspect colleagues may do
> this with shaded maps I would prefer to avoid them as (a) they present
> one fact per country per map (b) they are unfair to the Netherlands and
> other high density countries.
>
> What I would like to do is to make the background represent Europe
> (ideally with a map but that is a frill) then place simple scattergrams
> (or radar plots) on it located roughly where the country is. Another way
> of describing it might be to say that I want something like the panels
> produced by lattice but at arbitrary coordinates rather than on a
> rectangular grid. I suspect I have to do this from scratch and I would
> welcome hints.
>
> Am I right that there is no off the shelf way to do this?
>
> Is grid the way to go? Looking at the article in Rnews 2(2) and a brief
> scan of the documentation suggests so. If grid is the way to go then
> bearing in mind I have never used grid before (a) any hints about the
> overall possible solution structure would be welcome (b) is this
> realistic to do within a week or shall I revert to lattice and lose the
> geography?
>
Perhaps rather R-News 3/2, October 2003, "Integrating grid Graphics Output
with Base Graphics Output" by Paul Murrell. You might even consider just
scanning a basemap, using the pixmap package to read it and display it as
a backdrop, and using locator() to get the positions for the localised
graphics. For a vector backdrop alternative, try the maps package, world
map, and either set plotting limits or choose countries (or both to avoid
the French overseas administrative divisions), then locator or the World
Factbook to give you a label point.
> Is there a simple way to draw a map in the background? It needs to cover
> as far as Sweden, Spain and Greece. It can be crude, as long as Italy
> looks roughly like a boot that is fine. I am an epidemiologist not a
> geographer.
>
>
>
>
>
> Michael Dewey
> m.dewey at iop.kcl.ac.uk
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand at nhh.no
More information about the R-help
mailing list