r - Can I get coordinates of the circle created by `floating.pie` function in `plotrix`? -


i wondering how can x, , y values forming "circle" of pie chart produced "plotrix" package in r?

as example, how can x, , y values making "circle" of pie chart produced the r code below:

install.packages('plotrix') library("plotrix")  plot(1:5, type="n", xlab="x", ylab="y",xpd=t) floating.pie(3, 3, 1, col="white", radius=1) 

you can obtain on own using polar coordinates. , floating.pie doing same.

let radius, edges, xpos , ypos same feed floating.pie, circle determined following points:

radius <- 1; edges <- 200; xpos <- ypos <- 3  x <- radius * cos(seq(0, 2 * pi, length = edges)) + xpos y <- radius * sin(seq(0, 2 * pi, length = edges)) + ypos circle <- cbind(x, y)  plot(1:5, asp = 1)  ## set axis ratio 1:1 polygon(circle) 

enter image description here


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

java - How to provide dependency injections in Eclipse RCP 3.x? -