0

The diagram below shows the relations between the subsets of a set with three elements {x,y,z}.

How can one in Tikz draw such diagrams?

enter image description here

3
  • Where is your solution attempt? Commented Oct 7, 2023 at 20:32
  • actually, I tried to do it but failed drastically. I can only do such diagrams in the case of trees Commented Oct 7, 2023 at 23:29
  • 1
    Not related to circuitikz, tag removed.
    – Rmano
    Commented Oct 8, 2023 at 16:07

1 Answer 1

8

There are many ways. Here is a possibility with tikz-cd

enter image description here

\documentclass{article}

\usepackage{tikz-cd, amssymb}
\usetikzlibrary{shapes.geometric}

\tikzcdset{arrow style=tikz, diagrams={>={Triangle[open, length=2mm]}}}

\begin{document}

\begin{tikzcd}[cells={nodes={draw, ellipse, inner sep=0pt, minimum width=12mm, minimum height=8mm}}]
& \{x,y,z\}\\
\{x,y\}\arrow{ur} & \{x,z\}\arrow{u} & \{y,z\}\arrow{ul}\\
\{x\}\arrow{u}\arrow{ur} & \{y\}\arrow{ul}\arrow{ur} & \{z\}\arrow{ul}\arrow{u}\\
& \varnothing\arrow{ul}\arrow{u}\arrow{ur}
\end{tikzcd}

\end{document}
1
  • Thanks a lot for the answer! Commented Oct 8, 2023 at 5:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .