Customizing Euler Diagram colors with eulerr R

删除回忆录丶 提交于 2020-06-12 15:21:15

问题


I'm trying to plot a Euler Diagram using the eulerr package by Johan Larsson in R. I'm following this example where the developer explains how to customize colors/border transparency. However, when I try to implement it with the following code:

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)

Colors/border remain unchanged.

I am using RStudio 1.0.136, R 3.3.1 on Windows.


回答1:


Sorry about this. That post is old and the arguments have changed.

Try this instead

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))



来源:https://stackoverflow.com/questions/46044564/customizing-euler-diagram-colors-with-eulerr-r

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!