5

I tried setting edge from parent/.style={draw, bend left=60}, but the line remains straight. What am I doing wrong?

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[
        every node/.style={
                draw,
                circle,
        },
        edge from parent/.style={
                draw,
                bend left=25,
        },
]
\node {}
        child {node {}}
        child {node {}};
\end{tikzpicture}
\end{document}
  • 1
    Could you provide a mwe? – Claudio Fiandrino Aug 23 '12 at 9:54
  • @Claudio Added it now. – Vegard Aug 23 '12 at 10:05
  • Sorry to insist but that's not a MWE. It should start with \documentclass{} and up to \end{document} with necessary libraries etc. The common problem for us is to guess if any library is needed or not. – percusse Aug 23 '12 at 10:16
  • Sorry, I didn't realise that I should add the rest too (I thought that was part of being minimal). Here it is. – Vegard Aug 23 '12 at 10:20
9

Found the solution. Instead of

    edge from parent/.style={
            draw,
            bend left=25,
    },

I put

    edge from parent path={
            (\tikzparentnode\tikzparentanchor) edge [bend left=25]  (\tikzchildnode\tikzchildanchor)
    },

and it worked!

  • 2
    The explanation is that bend left only makes sense in a to or edge path construction. The default edge from parent path is drawn with just a line-to: --. – Loop Space Aug 23 '12 at 11:07
  • (Well done for figuring it out yourself, by the way) – Loop Space Aug 23 '12 at 11:08

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.