diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/venndiagram/samples/venn-sample.tex |
Initial commit
Diffstat (limited to 'macros/latex/contrib/venndiagram/samples/venn-sample.tex')
-rw-r--r-- | macros/latex/contrib/venndiagram/samples/venn-sample.tex | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/macros/latex/contrib/venndiagram/samples/venn-sample.tex b/macros/latex/contrib/venndiagram/samples/venn-sample.tex new file mode 100644 index 0000000000..344525c8e4 --- /dev/null +++ b/macros/latex/contrib/venndiagram/samples/venn-sample.tex @@ -0,0 +1,53 @@ +\documentclass{article} + +\usepackage{venndiagram} + +\begin{document} + +$ \mathcal{U} \setminus (\mathcal{A} \cup \mathcal{B} \cup +\mathcal{C})$: + +\begin{venndiagram3sets} + \fillNotABC +\end{venndiagram3sets} + +$ \mathcal{B} \setminus \mathcal{A} $ + +\begin{venndiagram2sets} +\fillOnlyB +\end{venndiagram2sets} + +No frame: + +\begin{venndiagram2sets}[showframe=false] +\fillOnlyB +\end{venndiagram2sets} + + +Using the labels: + +\begin{venndiagram3sets}[labelOnlyA={1},labelOnlyB={2},labelOnlyC={3}, + labelOnlyAB={4},labelOnlyAC={5},labelOnlyBC={6},labelABC={7}, + labelNotABC={8}] +\end{venndiagram3sets} + +Annotating the diagram: + +\begin{venndiagram3sets}[labelOnlyA={1},labelOnlyB={2},labelOnlyC={3}, + labelOnlyAB={4},labelOnlyAC={5},labelOnlyBC={6},labelABC={7}, + labelNotABC={8}] +\setpostvennhook +{ + \draw[<-] (labelA) -- ++(135:3cm) node[above] {Students who eat artichokes}; + \draw[<-] (labelB) -- ++(45:3cm) node[above] {Students who eat broccoli}; + \draw[<-] (labelC) -- ++(-90:3cm) node[below] {Students who eat carrots}; + \draw[<-] (labelABC) -- ++(0:3cm) + node[right,text width=4cm,align=flush left] + {7 students eat artichokes, broccoli and carrots}; + \draw[<-] (labelNotABC) -- ++(-135:3cm) + node[below,text width=4cm,align=flush left] + {8 students don't eat artichokes, broccoli or carrots}; +} +\end{venndiagram3sets} + +\end{document} |