Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
probml
GitHub Repository: probml/pyprobml
Path: blob/master/tikz/IV-DAG.tex
1191 views
1
\documentclass[tikz, border=2pt]{standalone}
2
% main document, called main.tex
3
\usepackage{tikz}
4
\begin{document}
5
6
\usetikzlibrary{fit,arrows,calc,positioning,shadows.blur}
7
8
\begin{tikzpicture}[var/.style={draw,circle,inner sep=0pt,minimum size=1.2cm},
9
latentconf/.style={draw,circle,dashed,inner sep=0pt,minimum size=1.2cm, fill=green!5}
10
]
11
% Nodes
12
\node (Z) [var] {$Z$};
13
\node (A) [var, right=.8cm of Z] {$A$};
14
\node (Y) [var, right=.8cm of A] {$Y$};
15
\node (X) [var, above=.8cm of A] {$X$};
16
\node (U) [latentconf, above=.8cm of Y] {$U$};
17
18
% Arrows
19
\path[->, line width=0.5mm]
20
(Z) edge (A)
21
(A) edge (Y)
22
(X) edge (A)
23
(X) edge (Y)
24
(X) edge (Z)
25
(U) edge (A)
26
(U) edge (Y);
27
\path[<->, line width=0.5mm]
28
(X) edge[bend left=90, dashed] (U);
29
30
\end{tikzpicture}
31
32
33
\end{document}
34
35