使用eulerr R自定义欧拉图颜色

编程入门 行业动态 更新时间:2024-10-10 15:20:20
本文介绍了使用eulerr R自定义欧拉图颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试使用R中的Johan Larsson的eulerr程序包绘制欧拉图.我关注的是此示例,其中开发人员说明了如何自定义颜色/边框透明度.但是,当我尝试使用以下代码实现它时:

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)

颜色/边框保持不变.

我正在Windows上使用RStudio 1.0.136,R 3.3.1.

I am using RStudio 1.0.136, R 3.3.1 on Windows.

推荐答案

很抱歉.那篇文章太旧了,争论也变了.

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

改为尝试

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

更多推荐

使用eulerr R自定义欧拉图颜色

本文发布于:2023-07-19 13:48:06,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1157117.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:自定义   颜色   欧拉   eulerr

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!