
Ich versuche, so etwas zu zeichnen. Ich habe es mit Tikz versucht, aber ich kann die Linie zwischen zwei Punkten nicht durchtrennen. Außerdem kann ich die erste Spalte mit dem Jahr nicht abrufen. Irgendwelche Vorschläge?
Das habe ich bisher
\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}
Aber vielleicht bin ich in die falsche Richtung gegangen.
Antwort1
\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}
Alle Knoten sind als Matrix organisiert. Für Linien wird die TikZ-Bibliothek verwendet decorations.markings
.