-
Notifications
You must be signed in to change notification settings - Fork 0
/
tikz-bipartite-thesis.tex
39 lines (33 loc) · 1.34 KB
/
tikz-bipartite-thesis.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
% 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
]
% the vertices of U
\begin{scope}[start chain=going below,node distance=7mm]
\foreach \i/\nodename in {1/pab175,2/pma385,3/pvi26}
\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=4cm,yshift=-0.5cm,start chain=going below,node distance=7mm]
\foreach \i/\repecid in {1/pab175,2/pze9,3/phe22,4/pma385,5/pvi26,6/ple92}
\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=(t1) (t3),label=above:$Thesis$] {};
% the set V
\node [ncentity,fit=(s1) (s6),label=above:$Persons$] {};
% the edges
\draw [lcauthor] (t1) -- (s1);
\draw [lcauthor] (t2) -- (s4);
\draw [lcauthor] (t3) -- (s5);
\draw [lcadvisor] (s2) -- (t1);
\draw [lcadvisor] (s3) -- (t1);
\draw [lcadvisor] (s1) -- (t2);
\draw [lcadvisor] (s4) -- (t3);
\draw [lcadvisor] (s6) -- (t3);
\end{tikzpicture}