venn

版本 1.7.0.0 (11.3 KB) 作者: Darik
Plot 2- or 3- circle area-proportional Venn diagram
8.3K 次下载
更新时间 2011/2/14

查看许可证

VENN Plot 2- or 3- circle area-proportional Venn diagram

VENN offers the following advantages over the VennX function available on the FEX:
1) It's much faster
2) Draws venn diagram as patch objects, allowing much greater flexibility in presentation (edge/face colors, transparency, etc.)
3) Returns a structure with required plotting data, allowing the user to make additional modifications (translation, scaling, rotation, etc.)
4) Supports multiple methods for optimizing the position of three-circle venn diagrams.

venn(A, I)
venn(Z)
venn(..., 'ErrMinMode', MODE)
H = venn(...)
[H, S] = venn(...)
[H, S] = venn(..., 'Plot', 'off')
S = venn(..., 'Plot', 'off')
[...] = venn(..., P1, V1, P2, V2, ...)

venn(A, I) by itself plots circles with total areas A, and intersection area(s) I. For two-circle venn diagrams, A is a two element vector of circle areas [c1 c2] and I is a scalar specifying the area of intersection between them. For three-circle venn diagrams, A is a three element vector [c1 c2 c3], and I is a four element vector [i12 i13 i23 i123], specifiying the two-circle intersection areas i12, i13, i23, and the three-circle intersection i123.

venn(..., 'ErrMinMode', MODE)
Used for 3-circle venn diagrams only. MODE can be 'TotalError' (default), 'None', or 'ChowRodgers'. When ErrMinMode is 'None', the positions and sizes of the three circles are fixed by their pairwise-intersections, which means there may be a large amount of error in the area of the three-circle intersection. Specifying ErrMinMode as 'TotalError' attempts to minimize the total error in all four intersection zones. The areas of the three circles are kept constant in proportion to their populations. The 'ChowRodgers' mode uses the the method proposed by Chow and Rodgers [Ref. 1] to draw 'nice' three-circle venn diagrams which appear more visually representative of the desired areas, although the actual areas of the circles are allowed to deviate from requested values.

H = venn(...) returns a two- or three- element vector of handles to the patches representing the circles.

[H, S] = venn(...) returns a structure containing descriptive valuescomputed for the requested venn diagram.

[...] = venn(..., P1, V1, P2, V2, ...) Specifies additional patch settings in standard Matlab parameter/value pair syntax. Parameters can be any valid patch parameter. Values for patch parameters can either be single values, or a cell array of length LENGTH(A), in which case each value in the cell array is applied to the corresponding circle in A.

See venn.m for additional options, descriptions, references, and examples.

引用格式

Darik (2024). venn (https://www.mathworks.com/matlabcentral/fileexchange/22282-venn), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2008b
兼容任何版本
平台兼容性
Windows macOS Linux
致谢

参考作品: Proportional Venn Diagrams

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.7.0.0

Bugfix: ChowRodgers mode failed when initial guess had zero three circle intersection

1.6.0.0

Fixed a typo in the help comments

1.4.0.0

Fixed a bug found by Eran Mukamel where zone centroids in the returned structure were miscalculated in some cases.

1.3.0.0

Fixed a bug found by Or Zuk (bug report via email) where zone centroids weren't properly calculated for two-set diagrams.

1.0.0.0