I now see the issue:  you have lat and long reversed in pie.chart.txt.  That 
puts you in Somolia and Kenya (which is why I suggested mapRegion="Somalia" 
earlier).

Jim

From: Jue Lin-Ye [mailto:jl.i...@gmail.com]
Sent: Sunday, April 12, 2015 9:30 AM
To: Baldwin, Jim -FS
Cc: r-sig-geo@r-project.org
Subject: Re: [R-sig-Geo] Fwd: Pie charts on a map. v2

​Thank you so much for answering! I have checked the two points that you have 
mentioned. I actually had library(rworldxtra) in my original, longer code, so I 
have copied it to this shorter one. However, R still refuses to plot anything 
on the map.

About point 2, I am focusing on the Catalan coast with
xlim=c(.5,3.5),ylim=c(40.5,42.42)

​and it seems that there is no option for "NE Spain", "Catalonia" or anything 
of the kind.

I enclose the modified code herein.

Best regards,

Jue​

On 12 April 2015 at 18:15, Baldwin, Jim -FS 
<jbald...@fs.fed.us<mailto:jbald...@fs.fed.us>> wrote:
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-boun...@r-project.org<mailto:r-sig-geo-boun...@r-project.org>]
 On Behalf Of Jue Lin-Ye
Sent: Sunday, April 12, 2015 8:40 AM
To: r-sig-geo@r-project.org<mailto:r-sig-geo@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

​
​ 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. ​
​



--
Jue

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to