5

In the MWE below:

\documentclass{report}
\usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage{tikz,pgf}


\usetikzlibrary{calc,trees,positioning,arrows,chains,shapes.geometric,%
    decorations.pathreplacing,decorations.pathmorphing,shapes,%
    matrix,shapes.symbols,automata}

\begin{document}

\begin{center}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto, node distance=3cm ,semithick]

    \node [draw,  rounded corners=2pt,rectangle, initial, initial text=\textbf{Query},initial where=above](timing) {Timing};
    \node [draw,  rounded corners=2pt,rectangle](indep)[right of=timing] {Independent};
    \node [draw,  rounded corners=2pt,rectangle](caching)[right of=indep] {Caching};
    \node [draw,  rounded corners=2pt,rectangle](pc)[right of=caching] {PC Logging};

    \node [draw, node distance=3cm, rounded corners=2pt,rectangle](stp)[right of= pc] {STP};

    \path (timing) edge[]   node{} (indep);

    \path (indep) edge[]   node{} (caching);

    \path (caching) edge[]   node{} (pc);

    \path (pc) edge[]   node{} (stp);

\end{tikzpicture}\\
\end{center}

\end{document}

How can I put a vertical arrow, that is pointing upwards, on the arrow (preferably at its mid point) between the PCLogging and STP boxes ?

0

1 Answer 1

5

Adding

\draw[->] ($(stp.west)!0.5!(pc.east)$) -- ++(0,1cm) node[above] {Text}; 

is sufficient to find the midpoint and adding text at the end.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .