The calc
library helps us to calculate the angle that is needed for the dashed line.
The points on the lines are pre-defined so that we simply can change the values there. As an example the coordinates p1-2
is relative to p1-1
as p1-3
to p1-2
.
The p23
coordinate is the point where the solid lines transfers into the curved dashed line.
Code
\documentclass[tikz,convert=false]{standalone} % the standalone class is for this MWE
% \usepackage{tikz} % use an appropriate class in your document
\usetikzlibrary{calc}
\tikzset{
bar/.style={
insert path={+(180:#1) edge[-,line cap=rect] +(right:#1) + (0,0)}
},
bar/.default=2pt+1.5\pgflinewidth,% mimics the | arrow
curved/.style={
out=200,
in=160,
distance=+1cm
}
}
\begin{document}
\begin{tikzpicture}[y=-1cm, x=1.5cm, >=stealth]
\foreach \xValue in {1,2,3}
\draw[|-] (\xValue,0) -- ++(90:4) node[at start, above] {P\xValue};
\path (1, .5) coordinate (p1-1)
++ (0,1 ) coordinate (p1-2)
++ (0, .5) coordinate (p1-3)
(2,1 ) coordinate (p2-1)
(2,1.4) coordinate (p2-2)
(2,2.5) coordinate (p2-3)
(2.7,1.8) coordinate (p23)
(3,2.7) coordinate (p3-1)
(3,3 ) coordinate (p3-2)
;
\foreach \cStart/\cTarget in {p1-1/p2-1, p1-1/p3-1, p2-2/p1-3}
\path [->] (\cStart) [bar] edge (\cTarget) (\cTarget) [bar];
\foreach \lBase/\cStart/\cTarget in {p1/1/2, p2/2/3}
\path [->] (\lBase-\cStart) [bar] edge[curved] (\lBase-\cTarget) (\lBase-\cTarget) [bar];
\path let \p1=(p2-2),
\p2=(p23),
\n1={atan2(\x2-\x1,\y2-\y1)}
in (\p1) edge (\p2)
(\p2) edge [out=\n1, in=\n1-180, dashed,->] (p3-2) (p3-2) [bar];
\draw[<-] (.5,4) -- ++ (270:1) node[above] {temps};
\end{tikzpicture}
\end{document}
Output