-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathenclosing-some-points.tex
61 lines (54 loc) · 1.71 KB
/
enclosing-some-points.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
% basic example using the fitting library.
% made for http://tex.stackexchange.com/a/114625/828
% updated after seeing http://tex.stackexchange.com/a/114687/828
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{fit}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\begin{document}
\begin{tikzpicture}[every fit/.style={red,dashed,rounded corners,draw}]
% Points and connecting arrows
%% Level A
\node at (3,8) (a) {\(\bullet\)};
%%Level B
\node at (1.75,6) (b1) {\(\bullet\)};
\node at (4.25,6) (b2) {\(\bullet\)};
\draw (a) -- (b1);
\draw (a) -- (b2);
%% Level C
\node at (1,4) (c1) {\(\bullet\)};
\node at (3,4) (c2) {\(\bullet\)};
\node at (5,4) (c3) {\(\bullet\)};
\draw (b1) -- (c1);
\draw (b1) -- (c2);
\draw [double=black,draw=white] (b2) -- (c1);
\draw (b2) -- (c3);
%% Level D
\node at (0,1.5) (d1) {\(\bullet\)};
\node at (1,2) (d2) {\(\bullet\)};
\node at (2,2) (d3) {\(\bullet\)};
\node at (4,1.5) (d4) {\(\bullet\)};
\node at (4,2.5) (d5) {\(\bullet\)};
\node at (6,2) (d6) {\(\bullet\)};
\draw (c1) -- (d1);
\draw (c2) -- (d2);
\draw (c2) -- (d3);
\draw (c2) -- (d4);
\draw (c3) -- (d5);
\draw (c3) -- (d6);
\draw [double=black,draw=white] (b2) to [out=-120, in=60] (d1);
% Fitting and labels of groups
\node [fit=(a),label=0:A] {};
\node [fit=(b1) (b2),label=0:B] {};
\node [fit=(c1) (c3),label=0:C] (C) {};
\node [fit=(d1) (d4) (d5) (d6),label=0:D] (D) {};
% Rest
\draw [->] (6,5) -- (8,5) node [midway,above] {\(\theta\)};
\node at (9,8) (e) {\(\bullet\)};
\node at (9,6) (f) {\(\bullet\)};
\node at (9,4) (g) {\(\bullet\)};
\node at (9,2) (h) {\(\bullet\)};
\draw [->] (e) -- (f) -- (g) -- (h);
\end{tikzpicture}
\end{document}