1

I am having an issue to create space for another arrow into the "Process Model". I would like to shift the elbow up so to be aligned with the entry point of the arrow.

I could probably do it by shifting the intermediate node at the elbow of the arrow by the yshift amount, but it seems just "ugly". Any suggestion on how to do it the right way?

Also, is there a better way to increase the side of all the arrow heads? The use of postaction also feels a bit of a "hack".

enter image description here

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{arrows}
\usetikzlibrary{decorations.markings}

\tikzset{
  joinnode/.style={draw, circle, fill=black, minimum size=0.15cm, inner sep=0cm},
  boxnode/.style={draw, fill=white, minimum width=2cm, minimum height=1.2cm, align=center}
}

\begin{document}

\begin{tikzpicture}[decoration={
      markings,
      mark=at position 1 with {\arrow[scale=2,black]{stealth}};
    }
  ]

\node[boxnode] (process) at (0,0) {Process};
 
\node (startnode) at (-5,0) {};
 
\draw[postaction={decorate}] (startnode.east) -- (process.west) node[midway,above] {Input data} node[midway,joinnode] (input) {};

%\node [jointnode, right=1.5cm of process] (node1) {};

\draw[postaction={decorate}] (process.east) -- (5,0) node[midway, above] {Sensor Data} node[pos=0.7, joinnode] (node1) {};

\node[boxnode, below=1cm of node1] (measure) {Measurement\\ Processing};

\draw[postaction={decorate}] (node1) -- (measure.north);

\node[boxnode, below=2.5cm of process] (model) {Process\\ Model};

\node[inner sep=0cm, minimum width=0cm] at (input |- model) (node2) {};

\draw (input) -- (node2);

\draw[postaction={decorate}] (node2) -- ([yshift=+0.25cm]model.west);

\end{tikzpicture}
\end{document}
0
1

The arrows.meta library has more options. The arrows library is mostly for backward compatibility.

With the calc library one can use things like ($(model.north west)!0.333!(model.south west)$) instead of [yshift=...].

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{arrows.meta}

\tikzset{
  joinnode/.style={draw, circle, fill=black, minimum size=0.15cm, inner sep=0cm},
  boxnode/.style={draw, fill=white, minimum width=2cm, minimum height=1.2cm, align=center}
}

\begin{document}

\begin{tikzpicture}[>={Stealth[width=8pt, length=12pt, inset=3pt]}]

\node[boxnode] (process) at (0,0) {Process};
 
\node (startnode) at (-5,0) {};
 
\draw[->] (startnode.east) -- (process.west) node[midway,above] {Input data} node[midway,joinnode] (input) {};

%\node [jointnode, right=1.5cm of process] (node1) {};

\draw[->] (process.east) -- (5,0) node[midway, above] {Sensor Data} node[pos=0.7, joinnode] (node1) {};

\node[boxnode, below=1cm of node1] (measure) {Measurement\\ Processing};

\draw[->] (node1) -- (measure.north);

\node[boxnode, below=2.5cm of process] (model) {Process\\ Model};

\node[inner sep=0cm, minimum width=0cm] at (input |- model) (node2) {};

\draw[->] (input) |- ([yshift=+0.25cm]model.west);

\end{tikzpicture}
\end{document}
0

Like this:

enter image description here

Dashed lines indicate possible input lines to node "Process Model".

Image code use relative positioning by use of syntax from the positioning library. In main branch are organized in chain, for edge labels are used quotes library.

%\documentclass{article}
\documentclass[border=3.141592]{standalone}

\usepackage{tikz}
\usetikzlibrary{}
\usetikzlibrary{arrows.meta,
                chains,
                positioning,
                quotes}

\begin{document}
    \begin{tikzpicture}[auto,
node distance = 4mm and 13mm,
  start chain = going right,
  arr/.style = {-Stealth},
  box/.style = {draw, 
                text width=2cm, minimum height=1.2cm,
                align=center},
  dot/.style = {circle, fill, inner sep=1.6pt, 
                outer sep=0pt, node contents={}},
                        ]
    \begin{scope}[nodes={on chain}]
\coordinate (in);
\node (n1) [dot];
\node (n2) [box] {Process};
\node (n3) [dot];
\coordinate (out);
    \end{scope}
\node (n4) [box, below=of n2.south -| n3] {Measurement Processing};
\node (n5) [box, below=of n2 |- n4.south] {Process Model};
% connections
\draw[arr] (in) to ["Input data"] (n2);
\draw[arr] (n2) to ["Sensor Data"] (out);
\draw[arr] (n3) to  (n4);
\draw[arr] (n1) |- ([yshift=3mm] n5.west);
% possible two more arrows
\draw[dashed, gray] (n5.west) -- ++ (-1,0);
\draw[dashed, gray] ([yshift=-3mm] n5.west) -- ++ (-1,0);
    \end{tikzpicture}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.