首页 > 解决方案 > R维恩图问题

问题描述

我对 R 中的维恩图有几个问题:

  1. 有没有办法在维恩图的每个数量后添加“K”或“M”?因为输入必须是数字,所以我不确定如何将其添加到标签上,因此它会显示在维恩图图像本身中。

  2. 对于整数,如 2,即使我的小数点为 1,它也会显示为“2”。如何调整整数末尾也有“.0”?

  3. 我的数量在小圆圈中重叠,因此无法读取。有没有手动移动它们的选项,这样它们就不会相互重叠?

编辑:我正在使用 Euler 包

示例代码:

plot(euler(c( "LUTS"=98, "Symptoms of UTI"=46, "Positive urine culture"=39, "Symptoms of UTI&LUTS"=33, "LUTS&Positive urine culture"=24, "Symptoms of UTI&Positive urine culture"=22, "Symptoms of UTI&LUTS&Positive urine culture"=18), input = "union", shape = "ellipse"), key = TRUE, counts = TRUE, quantities = list(type = c("counts", "percent"), font=3, round=2, cex=0.8), fills =list(fill=c(viridis::plasma(n = 3))), alpha = 0.3, c("#1957FF", "#FF750C", "#FF220C"), alpha = 0.3, edges=list(lty = 1), factor_names = TRUE, labels=list(font=2, cex=1), legend = FALSE)

标签: rvenn-diagram

解决方案


推荐阅读