<a id="Eunoia.venn"></a>

<a id="Eunoia.venn-Tuple{Any}"></a>

# Eunoia.venn

Julia · 1.0.1

[Source](<https://github.com/jolars/Eunoia.jl/blob/db1275ffc768591b8c9271c56d8dfa2f3351bfcd/src/Eunoia.jl>)

```julia
venn(
    sets;
    shape::AbstractString = "circle",
    complement::Union{Nothing, Real} = nothing
)
```

<a id="methods"></a>

## Methods

<a id="method-bbbc714ff4ee04865114c6da9ff4c367b2810c90b81d069f444213f78e966d5c"></a>

### `venn(
    sets;
    shape::AbstractString = "circle",
    complement::Union{Nothing, Real} = nothing
)`

[Source](<https://github.com/jolars/Eunoia.jl/blob/db1275ffc768591b8c9271c56d8dfa2f3351bfcd/src/Eunoia.jl>)

```julia
venn(sets; shape="circle", complement=nothing)
```

Build a canonical Venn diagram. `sets` selects the set names, as one of: 

- an `Integer` `n` — `n` sets with default names `"A"`, `"B"`, …;
- a vector of set names, e.g. `["cat", "dog", "fish"]`;
- a mapping whose keys are set/combination labels (the distinct base set names are extracted; values are ignored, since a Venn layout is non-proportional).

The number of names selects the arrangement; `shape` is `"circle"` (n ≤ 3), `"ellipse"` (n ≤ 5), `"square"`, `"rectangle"` (n ≤ 3), or `"rotated_rectangle"` (n ≤ 4). 

Pass `complement` to reserve that area outside every set; the fit then carries a `container` box (the "universe" frame) drawn behind the diagram, just as for [`euler`](<724ed6727eeae60915c72bfade1aba4de6ed59849fa7c8c0907cf91088d062d1>). 

```julia
venn(["A", "B", "C"]; shape="ellipse")
venn(3)
venn(4; shape="rotated_rectangle", complement=2)
```

Returns a [`VennFit`](<aaeedc476b437f51a25680a2e40c9055c9ecd3ca856c0fe73f756ff578293692>): the same structure as [`EulerFit`](<4ed69989ba26556a9f6f1924004c8ef9d3a879be2533c31ba480a63a0d640b42>), but the layout is topological, so `fitted_values` holds each region's geometric area and `original_values` is empty.
