-
Notifications
You must be signed in to change notification settings - Fork 0
/
tikz-bipartite-coauthor.tex
39 lines (33 loc) · 1.24 KB
/
tikz-bipartite-coauthor.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/Gross Labor-Force Flows,2/National Estimates,3/Sorting}
\node[fsnode,on chain] (p\i) [label=left: \i: \nodename] {};
\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/pvi26,4/psc351,5/pkr29,6/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 [ncentity,fit=(p1) (p3),label=above:$Papers$] {};
% the set V
\node [lcauthor,fit=(s1) (s6),label=above:$Authors$] {};
% the edges
\draw (p1) -- (s1);
\draw (p1) -- (s2);
\draw [lcattr] (p2) -- (s1);
\draw [lcattr] (p2) -- (s3);
\draw (p3) -- (s1);
\draw (p3) -- (s4);
\draw (p3) -- (s5);
\draw (p3) -- (s6);
\end{tikzpicture}