-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtikz-tripartite-hilite.tex
81 lines (70 loc) · 2.64 KB
/
tikz-tripartite-hilite.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
% from http://tex.stackexchange.com/questions/15088/bipartite-graphs
\begin{tikzpicture}[thick,
>=triangle 60, % Nice arrows; your taste may be different
every node/.style={draw,circle},
fsnode/.style={fill=ncentity},
ssnode/.style={fill=lcauthor!25},
every fit/.style={ellipse,draw,inner sep=2pt,text width=2cm},
->,shorten >= 3pt,shorten <= 3pt
]
\begin{scope}[start chain=going below,node distance=7mm]
\foreach \i/\dataname in {1/CPS,2/LEHD,3/QWI,4/National QWI}
\node[fsnode,on chain] (d\i) [label=left: \dataname] {};
\end{scope}
% the vertices of U
\begin{scope}[xshift=4cm,start chain=going below,node distance=7mm]
\foreach \i/\nodename in {1/Gross Flows,2/Nat.Estimates,3/Sorting}
\node[fsnode,on chain] (p\i) [label=above: \i] {};
\end{scope}
% the vertices of T
\begin{scope}[xshift=4cm,yshift=-4cm,start chain=going below,node distance=7mm]
\foreach \i/\nodename in {1/pab175,2/pma385,3/pvi26,4/psc351}
\node[fsnode,on chain] (t\i) [label=left: \href{https://genealogy.repec.org/pages/\nodename .html}{\nodename thesis}] {};
\end{scope}
%
% the vertices of V
\begin{scope}[xshift=8cm,yshift=-0.5cm,start chain=going below,node distance=7mm]
\foreach \i/\repecid in {1/pab175,2/pze9,3/pvi26,4/psc351,5/pkr29,6/pma385,7/ple92,8/unknown}
\node[ssnode,on chain] (s\i) [label=right: \i\ \href{http://ideas.repec.org/f/\repecid .html}{\repecid}] {};
\end{scope}
% the set U
\node [lcauthor,fit=(p1) (p3),label=above:$Papers$] {};
% the set V
\node [ncentity,fit=(s1) (s8),label=above:$Authors$] {};
% the set T
\node [lcauthor,fit=(t1) (t4),label=below:$Thesis$] {};
% the set D
\node [fit=(d1) (d4),label=above:$Data$] {};
% the edges
\draw [dotted] (p1) -- (s1);
\draw [dotted] (p1) -- (s2);
\draw [lcauthor, ultra thick] (p2) -- (s1);
\draw [lcauthor, ultra thick] (p2) -- (s3);
\draw [dotted] (p3) -- (s1);
\draw [dotted] (p3) -- (s4);
\draw [dotted] (p3) -- (s5);
\draw [dotted] (p3) -- (s8);
% for the theses
% the edges
\draw [dotted] (t1) -- (s1);
\draw [dotted] (t2) -- (s4);
\draw [dotted] (t3) -- (s5);
\draw [dotted] (t4) -- (s4);
\draw [dotted] (s2) -- (t1);
\draw [dotted] (s3) -- (t1);
\draw [dotted] (s1) -- (t2);
\draw [dotted] (s4) -- (t3);
\draw [dotted] (s6) -- (t3);
\draw [dotted] (s1) -- (t4);
% data
\path (d1) to node [dotted, yshift=-1em, above, draw=none] {used} (p1);
\draw [dotted] (p1) -- (d1);
\draw [dotted] (p2) -- (d3);
\draw [dotted] (p2) -- (d1);
\draw [dotted] (d3) -- (d2);
\draw [dotted] (d4) -- (d3);
\draw [dotted] (p3) -- (d2);
\draw [dotted] (t4) -- (d2);
\path (d4) to node [lcadvisor,below, rotate=30, yshift=2em, draw=none] {generatedBy} (p2);
\draw [lcadvisor, ultra thick] (d4) -- (p2);
\end{tikzpicture}