R GGPlot2-绘制过零的圆弧(几何圆弧)

R GGPlot2-绘制过零的圆弧(几何圆弧),r,ggplot2,R,Ggplot2,我正在尝试使用几何圆弧绘制一条圆弧,该圆弧穿过0度/弧度,但是每当我尝试此操作时,软件包都希望反转圆弧的方向 在下面的示例中,我希望从5.76弧度开始,绘制一条穿过圆顶部的弧度为0.52弧度的圆弧。我该怎么做 > arcs row tube x y radius depth start stop 2 1 2 381 577.85 12.7 0.17 5.759587 0.5235988 ggplot(arcs) + geom_arc(

我正在尝试使用几何圆弧绘制一条圆弧,该圆弧穿过0度/弧度,但是每当我尝试此操作时,软件包都希望反转圆弧的方向

在下面的示例中,我希望从5.76弧度开始,绘制一条穿过圆顶部的弧度为0.52弧度的圆弧。我该怎么做

> arcs
  row tube   x      y radius depth    start      stop
2   1    2 381 577.85   12.7  0.17 5.759587 0.5235988

ggplot(arcs) +
  geom_arc(aes(x0 = x, y0 = y, r = radius, start = start, end = stop),color="red", size=1)

要绘制互补弧,必须设置
开始=-0.5235988
结束=2*pi-5.759587


编辑 不,对不起。这在这里起作用,因为圆弧是对称的。但从概念上讲,好的答案是
start=5.759587-2*pi
end=0.5235988

检查此非对称示例:

library(ggforce)
ggplot() + 
  geom_arc(aes(x0=381, y0=577.85, r=12.7, start=1, end=5.76)) + 
  geom_arc(aes(x0=381, y0=577.85, r=12.7, start=5.76-2*pi, end=1), 
           color = "red", size = 2)