I am using tikz-qtree
, and I'd like to draw a curve separating a set of nodes from the rest of the tree. For example,
\documentclass{article}
\usepackage{tikz}
\usepackage{tikz-qtree}
\begin{document}
\begin{tikzpicture}[every node/.style={circle,draw,
top color=white,bottom color=yellow!80,
very thin},
level distance=1.5cm,
sibling distance=0.6cm]
\Tree[.{$+$}
[.{$*$}
[.{$\cos$}
[.{$a$} ] ]
[.{$2$} ] ]
[.{$y$} ] ]
\end{tikzpicture}
\end{document}
produces this (sorry, I don't know yet how exactly to upload pictures to tex.stackexchange, so this ended up a bit small):
Now, I'd like to draw a (dotted) curve that crosses one edge (for example, the edge from *
to cos
) -- splitting the set of nodes in two (cos
and a
and all the others).
I know I can use the fit
library to draw an ellipsis around the nodes, but I'd like
an open line instead (more like a circumference arc, or a bezier curve).
What's the easiest way to do this?