开发者

Drawing quarter of a circle in R

开发者 https://www.devze.com 2023-03-01 09:35 出处:网络
I need开发者_开发知识库 to draw 90 degrees of a circle in r. I know how to draw a full circle in R with draw.circle but I don\'t know how to hide270 degrees of it!

I need开发者_开发知识库 to draw 90 degrees of a circle in r. I know how to draw a full circle in R with draw.circle but I don't know how to hide 270 degrees of it!

Thank you.


You are using the package plotrix. Plotrix also has a function draw.arc.

library(plotrix)
?draw.arc


You can also use the package grid, and the function grid.curve.

eg.

library(grid)
plot.new()
vp=viewport(x=0.5,y=0.5,width=1, height=1)
pushViewport(vp)

grid.curve(0.5,0.5,0.3,0.3, curvature=arcCurvature(90),square=F,ncp=10)
0

精彩评论

暂无评论...
验证码 换一张
取 消