如何绘制 4 组维恩图

发布于 2024-10-10 11:56:07 字数 220 浏览 5 评论 0原文

我有四组 ID(存储在单独的文本文件中),我想创建一个维恩图来显示这些组如何重叠。我能够将列表粘贴到 此 Web 应用程序 中并获得一个简单的图表,但我正在寻找一些我可以更多控制的东西(颜色,图形大小等)。有什么建议吗?我的第一个想法是 R,但我乐于尝试任何东西。

I have four sets of IDs (stored in separate text files) and I would like to create a Venn diagram showing how these sets overlap. I was able to paste the lists into this web app and get a simple diagram, but I'm looking for something over which I have a bit more control (colors, graphic size, etc). Any suggestions? My first thought would be R, but I'm comfortable trying anything out.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

装迷糊 2024-10-17 11:56:07

那么,在提供的应用程序中,您只是在固定图像上绘制文本,对吧?您希望能够使用您自己的颜色创建四组维恩图吗?在这种情况下,您应该可以使用几乎任何服务器端脚本语言,即 PHP 或 ASPX。如果您的解决方案固定为四组(或更少),则适当放置省略号应该是简单的数学运算。 ImageMagick 应该可以在许多社区开发的编程语言中实现这一点。

So, in the provided app you are just painting text on top of a fixed image, right? And you want to be able to create Venn-diagrams with four sets with your own colors? In that case you should be fine with pretty much any server side scripting language, i.e. PHP or ASPX. If your solution is fixed to four sets (or less), placing the ellipses appropriately should be simple math. ImageMagick should i.e. do the trick in many community-developed programming languages.

情定在深秋 2024-10-17 11:56:07

这可能有点过头了,但是 python 与 matplotlib 怎么样?使用Python的内置集合类型,计算交集和并集是很简单的(例如set1 ^ set2用于交集)。然后,matplotlib 可以相对轻松地生成高质量的图表。该库还允许用户广泛定制图形的呈现,包括图形大小和颜色。

至于matplotlib中的维恩图,您可以在其存档中找到一个简单的示例 邮件列表

It might be overkill, but how about python with matplotlib? With python's built-in set type, computing intersections and unions is trivial (e.g. set1 ^ set2 for intersection). Then, matplotlib can generate high quality graphs with relative ease. The library also let its users customize presentation of graphs extensively including figure size and colors.

As for venn diagram in matplotlib, you can find a simple example in the archive of its mailing list.

臻嫒无言 2024-10-17 11:56:07

今天刚刚发布了一个新的 R 包(请参阅 BioMed Central 的文章)。该软件包可以绘制最多 4 组维恩图。

A new R package was just published today (see the article at BioMed Central). This package can plot Venn diagrams with up to 4 sets.

绾颜 2024-10-17 11:56:07

有一个python包, matplotlib-venn,用于绘制最多 3 组比例维恩图。

There is a python package, matplotlib-venn, for plotting proportional Venn diagrams up to 3 sets.

夏夜暖风 2024-10-17 11:56:07

我能够使用 creately 创建漂亮的维恩图。您必须注册才能保存和导出您的数据,但该帐户是免费的。我在 matplotlib_venn 由于某种原因无法给出良好结果的情况下使用它。

I was able to create good-looking Venn diagrams using creately. You have to sign up to be able to save and export your figures, but the account is free. I use it in cases where matplotlib_venn does not give good results for one reason or another.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文