Pie charts on a map. v2
I think there are two issues:
1. You need the rworldxtra package to get the countriesHigh dataset so adding in
library(rworldxtra) is necessary.
2. I think you need to "focus" the figure to a smaller area and add in a statement
like mapRegion="Somalia" in the mapPies function.
Jim
From: R-sig-Geo [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Jue Lin-Ye
Sent: Sunday, April 12, 2015 8:40 AM
To: r-sig-geo at r-project.org
Subject: [R-sig-Geo] Fwd: Pie charts on a map. v2
?
Dear sirs/madams,
May someone please help me with this issue: I have been trying to plot pie charts on a map, without much success (see code enclosed herein). This is quite distressing to me, as I had plot the same kind of map before without problems. It would be appreciated if anyone would point out the flaw. I enclose a reproducible set of data and codes for you to work with. I have tested the code, you just have to paste the three of the files in the same folder.
Thank you very much in advance.
?
Jue Lin-Ye --------------------------------------------------------------- Civil Engineering phD candidate Maritime Engineering Laboratory (LIM) Universitat Polit?cnica de Catalunya (UPC) C/Jordi Girona 1-3, Barcelona 08034 (Spain) ----------------------------------------------------------------- ? ? ? P.S.: My e-mails asking for questions are sometimes quite short and can seem rude, I am sorry for that. The truth is that I hearfully appreciate any help of yours. ? ?