[R-sig-Geo] pieSP: pie charts on map

Jue Lin-Ye jl.iccp at gmail.com
Wed Oct 22 14:33:57 CEST 2014


Dear list members,

I am working on the following code.
https://dl.dropboxusercontent.com/u/61881075/R-geo-help/question_draw_pie.v1.R
https://dl.dropboxusercontent.com/u/61881075/R-geo-help/Question_Tr_1_.H0_2.3m.v8.txt
https://dl.dropboxusercontent.com/u/61881075/R-geo-help/Question_Tr_2_.H0_2.3m.v8.txt
https://dl.dropboxusercontent.com/u/61881075/R-geo-help/Question_wana_coord.3.txt

(this might be erased after solution of problem)


 I am characterizing marine storms. There are four variables: slogE,
sloguE, slogT and slogD.

I would like to do the following

-draw a map for every return period (Tr) and every variable
 - have a pie chart for every WANA node (Here I have two nodes. The node
names are shown on the first column of Data.1.txt)
-Use the same colors for every variable. I mean, for Tr=1 through 50 years,
all the variables increase with return period, but I would like to have the
same colors for the same value ranges, in order to compare the maps. That
is, if return period 1year has slogE within the ranges (0,1] and (1,2] and
return period =2 years has slogE within the ranges (1,2] and (2,3], I would
like to take all (0,1]=blue, (1,2]=green and (2,3]=red and have two slices
of blue-green in Tr=1 year and two slices of green-red in Tr=2 years.

like this

http://alaska.usgs.gov/science/biology/seabirds_foragefish/foragefish/images/beach_seine_comp_pie_charts_sm.gif

I would also like to

-Show a legend on one side.

​Comments:

-I often have problems with zeroes, I would like the code to ignore zeroes
and just not to plot them.​

Please contact me for any doubt.

​Jue Lin-Ye​

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list