1

I try to find midway position on this kind of pathes :

enter image description here

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}

\pagestyle{empty}

\begin{document}

\tikzset{pics/.cd,
    % Marque ronde
    Dot/.style args={#1 and #2}{%
        code = {%
        \fill[#2] (0,0) circle (#1 pt) ;
        }
    },
    Dot/.default={1.25 and black},
}


\begin{tikzpicture}

\draw (0,0) -- (3,0) pic[midway] {Dot} ;

\draw (0,0) --++ (0,5pt) -| (3,0) pic[midway] {Dot} ;

\draw (0,0) --++ (0,-5pt) pic[midway] {Dot} -| (3,0) ;


\end{tikzpicture}
\end{document}
Tarass
  • 16,912
  • 1
    The good command is \draw (0,0) --++ (0,5pt) -| (3,0) pic[pos=.25] {Dot} ; according to https://tex.stackexchange.com/questions/350639/placing-nodes-midway-on-paths-using-or-in-tikz/350641 – Tarass Apr 02 '18 at 20:11

0 Answers0