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

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -