[Tex/LaTex] Draw arrow with corners in tikz

nodestikz-pgf

I want to draw a line with multiple corners/segments, i.e. instead of being straight, it looks more like a Z with an arrow on the end. The code for the first part of the line looks like this:

\documentclass{article}
\usepackage{pgfplots}
\begin{document}
    \begin{tikzpicture}
    \begin{axis}
    \addplot graphics[xmin=0,xmax=5,ymin=0,ymax=5,] {Images/test}
        node (name2) at (300pt,102pt) {label} (name2.west) edge[-,color=white,very thick] (245pt,110pt);
    \end{axis}
    \end{tikzpicture}
\end{document}

How do I modify this so that the line continues on from the point (245pt,110pt) to (245pt,130pt) in the style [-,color=white,very thick], then from (245pt,130pt) to (300pt,145pt) in the style [-stealth,color=white,very thick]?

Best Answer

As far as I understand you want a simple line over four points with an arrow at the end, so you don't need the edge-tool. Without the plot (which I can't compile without a MWE), this should create what you want:

\documentclass{article}
\usepackage{tikz}
\begin{document}
    \begin{tikzpicture}
    \node (name2) at (300pt,102pt) {label};
    \draw[-stealth,color=blue,very thick] (name2.west) -- (245pt,110pt) -- (245pt,130pt) -- (300pt,145pt);
    \end{tikzpicture}
\end{document}

enter image description here