Hi Boris,
Your code works wonderful but still I need pies plotting over map of a
country.
For now I get axis where coordinates are shown and it works great.
Regards


On Wed, Apr 16, 2014 at 12:09 AM, Boris Steipe <boris.steipe@utoronto.ca>wrote:

> Here you go:
>
> install.packages("plotrix")
> library(plotrix)
>
> ?floating.pie
>
> dat<- data.frame(x=c(19.9437314, 20.2214171, 20.0955891, 20.9506636),
>                  y=c(40.7086377, 41.4924336, 39.9481364, 40.6447347),
>                  City=c(120,1, 4, 10),
>                  Village=c(425, 1, 4, 15)
>                 )
>
> # first, set up an existing plot to plot your pies into, for example
> plot(c(min(dat$x)-0.5, max(dat$x)+0.5),
>      c(min(dat$y)-0.5, max(dat$y)+0.5),
>      xlab = "", ylab = "", type = "n"
>     )
>
> # your pie-chart sectors are rows of the City and Village columns
> sectors = cbind(dat$City,dat$Village)
>
> # plot each pie chart in turn
> for (i in 1:length(dat$x)) {
>     floating.pie(dat$x[i],
>                  dat$y[i],
>                  sectors[i,],
>                  radius=0.1
>                 )
> }
>
> Enjoy,
> B.
>
>
> On 2014-04-15, at 2:43 PM, DrunkenPhD wrote:
>
> > Sorry Jim not for my beginner level :(((
> >
> > So if my data are like this :
> >
> > x                             y                   City          Village
> >
> > 19.9437314          40.7086377          120         425
> >
> > 20.2214171          41.4924336          1              1
> >
> > 20.0955891          39.9481364          4              4
> >
> > 20.9506636          40.6447347          10           15
> >
> > how do I plot for every point(x,y) a pie chart with slices(City,Village)?
> > Regards
> >
> >
> > how do I plot for every point(x,y) a pie chart with slices(City,Village)?
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > ______________________________________________
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
>


-- 
 Endri Raço PhD
_________________________________________________
Polytechnic University of Tirana
Faculty of Mathematical Engineering and Physics Engineering
Department of Mathematical Engineering
Address:  Sheshi Nene Tereza, Nr. 4, Tirana - ALBANIA
Mobile: ++ 355 682061988

	[[alternative HTML version deleted]]


