我正在尝试使用 ggplot2 制作类似于arcdiagram包的弧线图geom_curve
:
library(ggplot2)
ggplot(myDat, aes(x = A, xend = B, y = 0, yend = 0)) +
geom_curve(alpha = 0.2, curvature = 1, ncp = 1000, lineend = 'butt')
有些曲线低于 0,我怎样才能让它们都高于 Y = 0?
数据:
myDat <-
structure(list(A = c(36047276L, 36074979L, 36074979L, 36074979L,
36074979L, 36074979L, 36074979L, 36074979L, 36074979L, 36074979L,
36074979L, 36077099L, 36077099L, 36077099L, 36077099L, 36077099L,
36077099L, 36077099L, 36077099L, 36098040L, 36098040L, 36098040L,
36098040L, 36098040L, 36098040L, 36098040L, 36098040L, 36098040L,
36098040L, 36098040L, 36098040L, 36098040L, 36098040L, 36098040L,
36098040L, 36098040L, 36099840L, 36099840L, 36099840L, 36099840L,
36099840L, 36099840L, 36099840L, 36099840L, 36099840L, 36099840L,
36099840L, 36099840L, 36099840L, 36099840L, 36099840L, 36099840L,
36099840L, 36101586L, 36101586L, 36101586L, 36101586L, 36101586L,
36101586L, 36101586L, 36101586L, 36101586L, 36101586L, 36101586L,
36101586L, 36101586L, 36101586L, 36101586L, 36101586L, 36101586L,
36103565L, 36103565L, 36103565L, 36103565L, 36103565L, 36103565L,
36103565L, 36103565L, 36103565L, 36103565L, 36103565L, 36103565L,
36103565L, 36103565L, 36103565L, 36103565L, 36103565L),
B = c(36047417L,
36077099L, 36077279L, 36077863L, 36078510L, 36079111L, 36079565L,
36080165L, 36080428L, 36082473L, 36082907L, 36074979L, 36077279L,
36077863L, 36078510L, 36079111L, 36079565L, 36080165L, 36082907L,
36096300L, 36097775L, 36098987L, 36099840L, 36099952L, 36100767L,
36101156L, 36101586L, 36101633L, 36101926L, 36102035L, 36102381L,
36102833L, 36103149L, 36103565L, 36103872L, 36104121L, 36096300L,
36097775L, 36098040L, 36098987L, 36099952L, 36100767L, 36101156L,
36101586L, 36101633L, 36101926L, 36102035L, 36102381L, 36102833L,
36103149L, 36103565L, 36103872L, 36104121L, 36096300L, 36097775L,
36098040L, 36098987L, 36099840L, 36099952L, 36100767L, 36101156L,
36101633L, 36101926L, 36102035L, 36102381L, 36102833L, 36103149L,
36103565L, 36103872L, 36104121L, 36096300L, 36097775L, 36098040L,
36098987L, 36099840L, 36099952L, 36100767L, 36101156L, 36101586L,
36101633L, 36101926L, 36102035L, 36102381L, 36102833L, 36103149L,
36103872L, 36104121L)), .Names = c("A", "B"),
class = "data.frame", row.names = c(NA, -87L))