If possible, it's always nice to provide a Minimal Working Example (MWE), to show us what you've tried so far, so that we can try and provide a solution along the lines that you're looking for. Nonetheless, since you had some general questions as well, I thought that I would provide an answer with one possible way of doing this (using TikZ
) and try to answer some of your general questions.
TikZ
is a pretty powerful drawing package that allows you to draw almost anything (see texample.net; PStricks
is another package, but I'm not too familiar with it), so you don't have to draw an image like this with other software and then include it as an image. That is a possibility, but if you can write the image using a package without too much hassle, I would generally do that since including images of certain file types (e.g., .eps
, .pdf
, etc.) can sometimes cause problems in certain cases (see Which figure type to use: pdf or eps?).
So anyway, you can do this in TikZ
. The solution I've provided also makes use of the varwidth
package in order to allow linebreaks inside the TikZ
node
s (see Manual/automatic line breaks and text alignment in TikZ nodes) as well as the TikZ
library positioning
in order to place the node
s relative to one another:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage{varwidth}
\begin{document}
\begin{tikzpicture}
\node [draw,circle,fill=black] (begin-node) {};
\node [below=2.5cm of begin-node] (0) {0};
\node [right=1.5cm of 0] (1) {1};
\node [right=2cm of 1] (2) {2};
\node [right=2cm of 2] (3) {3};
\node [above=0.5cm of 1,draw,circle] (F1) {\begin{varwidth}{1cm}\centering F \\ 1\end{varwidth}};
\node [above=2.5cm of F1,draw,circle] (T1) {\begin{varwidth}{1cm}\centering T \\ 1\end{varwidth}};
\node [above=0.5cm of 2,draw,circle] (F2) {\begin{varwidth}{1cm}\centering F \\ 2\end{varwidth}};
\node [above=2.5cm of F2,draw,circle] (T2) {\begin{varwidth}{1cm}\centering T \\ 2\end{varwidth}};
\node [above=0.5cm of 3,draw,circle] (F3) {\begin{varwidth}{1cm}\centering F \\ 3\end{varwidth}};
\node [above=2.5cm of F3,draw,circle] (T3) {\begin{varwidth}{1cm}\centering T \\ 3\end{varwidth}};
\draw[->] (begin-node) -- (T1);
\draw[->] (begin-node) -- (F1);
\draw[->] (T1) -- (T2);
\draw[->] (F1) -- (F2);
\draw[->] (T2) -- (T3);
\draw[->,dashed] (F2) -- (F3);
\draw[->,dashed,very thick] (F1) -- (T2);
\draw[->,dashed,thick] (T2) -- (F3);
\end{tikzpicture}
\end{document}
