使用eulerr R

时间:2017-09-04 22:11:17

标签: r plot venn-diagram

我试图使用Johan Larsson在R中使用eulerr包绘制Euler图。我跟随this example开发人员解释如何自定义颜色/边框透明度。但是,当我尝试使用以下代码实现它时:

fit2 <- euler(c(A = 16971, B = 218, C = 215, 
                "A&B" = 112, "A&C" = 112, "B&C"= 51,"A&B&C" = 23))
plot(fit2,
 polygon_args = list(col = c("dodgerblue4", "darkgoldenrod1", "cornsilk4"),
                     border = "transparent"),
 text_args = list(font = 8), counts=TRUE)

颜色/边框保持不变。

我在Windows上使用RStudio 1.0.136,R 3.3.1。

1 个答案:

答案 0 :(得分:4)

对此感到抱歉。那篇文章很旧,论点也发生了变化。

试试这个

fit2 <- euler(c(A = 16971, B = 218, C = 215, 
                "A&B" = 112, "A&C" = 112, "B&C"= 51,"A&B&C" = 23))
plot(fit2,
     fills = c("dodgerblue4", "darkgoldenrod1", "cornsilk4"),
     edges = FALSE,
     fontsize = 8,
     quantities = list(fontsize = 8))

enter image description here