0

I woud like to place a node below a decoration path (i.e. at something like "myDecoratePath.south") composed of a series of arrows: enter image description here

In order to obtain something like this:

enter image description here

Is there a way to do it with the following Minimal Non Working Example (inspired from pschulz's answer)?

\documentclass[tikz,drop]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}

\tikzset{arrow/.pic={ \draw[-latex,line width=1pt] (0,0) -- (0.1,0);% }}%

\begin{document} \begin{tikzpicture}[decoration = {% markings,% mark =% between positions 0 and 1 step 5mm % adjust step size here with {% {\pic {arrow};}, postaction={decorate}}% }% ]% \path[decorate] (0, 0) -- (2, 0);% % Here the node I would like to place at something like 'myDecoratePath.south' % \node (n1) [draw, text width=3em, minimum height=2em] {node 1};% \end{tikzpicture} \end{document}

zetyty
  • 779

1 Answers1

1

Just place your node right inside your path and adjust the positioning.

node relative to a path

\documentclass[tikz,drop,border=3.14mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.markings, positioning}

\tikzset{arrow/.pic={ \draw[-latex,line width=1pt] (0,0) -- (0.1,0);% }}%

\begin{document} \begin{tikzpicture}[decoration = {% markings,% mark =% between positions 0 and 1 step 5mm % adjust step size here with {% {\pic {arrow};}, postaction={decorate}}% }% ]% \path[decorate] (0, 0) -- (2, 0) node (n1) [pos=0.5, below = 4 pt , draw, text width=3em, minimum height=2em] {node 1};% \end{tikzpicture} \end{document}

SebGlav
  • 19,186