I'm trying to draw a dependency graph, I've followed this example, but I'm having difficulties with one node. I need node t
to have two childs: r_vec
and dR
. However, I don't know how to link t
and dR
.
I have the following code:
\documentclass[a4paper]{article}
\usepackage{tikz}
\definecolor{pink}{RGB}{255,182,193}
\begin{document}
\begin{figure}
\begin{tikzpicture}[sibling distance=10em,
every node/.style = {shape=rectangle, rounded corners,
draw, align=center, minimum height=0.6cm,
fill=pink}], level 7/.style={sibling distance=3cm}]
\node {final\_image}
child { node {complex\_image}
child { node {interp\_result}
child { node {rc}
child { node {ph\_data} }}
child { node {t}
child {node {r\_vec} } } }
child { node {ph\_corr}
child { node [right=1.5cm] {exp}
child { node {dR}
child { node [left=1.3cm] {x\_dist}
child { node {ant\_x} }
child { node {x\_mat} }
}
child { node {y\_dist}
child { node {ant\_y} }
child { node {y\_mat} }
}
child { node [right=1.3cm] {z\_dist}
child { node {ant\_z} }
child { node {z\_mat} }
}
}
child { node {min\_f}}
}}};
\end{tikzpicture}
\end{figure}
\end{document}
that generates this graph:
I would also like to center the graph in the middle of the page, ignoring the margins, but don't know how to do that. I appreciate any help!