
나는 이런 것을 그리려고 노력하고 있습니다. 나는 tikz를 시도했지만 두 점 사이의 선을 자를 수 없습니다. 또한 연도의 첫 번째 열을 얻을 수 없습니다. 어떤 제안이 있으십니까?
이것이 내가 지금까지 가지고 있는 것입니다
\documentclass[10pt]{article}
\usepackage{tikz}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}[->,>=stealth',auto,node distance=3cm,
thick,main node/.style={circle,draw,font=\sffamily\Large\bfseries}]
\node[main node] (1) {};
\node[main node] (2) [below of=1] {};
\node[main node] (3) [below of=2] {};
\node[main node] (4) [below of=3] {};
\node[main node] (5) [left of=2] {};
\node[main node] (6) [left of=3] {};
\node[main node] (7) [left of=4] {};
\node[main node] (8) [left of=7] {};
\path[every node/.style={font=\sffamily\small}]
(5) edge node [right] {} (2)
(6) edge node [right] {} (3)
(7) edge node [right] {} (4)
(8) edge node [right] {} (7);
\end{tikzpicture}
\end{document}
그러나 아마도 나는 잘못된 방향으로 가고 있는 것 같습니다.
답변1
\documentclass[tikz, margin=3mm]{standalone}
\usetikzlibrary{decorations.markings,
matrix}
\usepackage{amsmath}
\begin{document}
\begin{tikzpicture}[node distance=3cm,
thick,
decoration = {markings,% switch on markings
mark=% actually add a mark
at position 0.5 with {\draw (-2pt,-2pt) -- (2pt,2pt);}
},
]
\matrix (m) [matrix of math nodes,
nodes in empty cells,
column sep=9mm]
{
t-2 & t-1 & t & \text{year} \\
& & \circ & 0 \\
& \circ & \bullet & 1 \\
& \bullet & \bullet & 2 \\
\bullet & \bullet & \bullet & 3 \\
};
\draw[postaction={decorate}] (m-4-2.center) -- (m-4-3.center);
\draw[postaction={decorate}] (m-5-1.center) -- (m-5-2.center);
\draw[postaction={decorate}] (m-5-2.center) -- (m-5-3.center);
\end{tikzpicture}
\end{document}
모든 노드는 매트릭스로 구성됩니다. 라인에는 TikZ 라이브러리가 사용됩니다 decorations.markings
.