|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Design questionHi,
I am trying to draw a tree to explain a search procedure, but I do not want to draw all branches... only the relevant ones. I do want to pass to the viewer that the branches that I didn't open do continue to be explored by the procedure. For this I tried to use $\vdots$ as the node label of the nodes that will keep being explored. This doesn't seem to good as the vdots don't show exactly beneath the tree branch and doesn't look too good. I am mainly interested in ideas on the best way to do this. Any suggestions? --- Here's what I have \documentclass[11pt]{minimal} \usepackage{tikz} \usetikzlibrary{shapes,arrows,trees,matrix,positioning,decorations.pathmorphing,scopes} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \renewcommand{\rmdefault}{ppl} \usepackage[euler-digits]{eulervm} \usepackage[scaled]{beramono} \usepackage{bsymb} \usepackage[active,tightpage]{preview} \PreviewEnvironment{tikzpicture} \setlength\PreviewBorder{1pt}% \begin{document} \begin{tikzpicture}[ split/.style={ rectangle, minimum size=2mm, solid,thick,draw=black!50, top color=white, bottom color=red!50}, state/.style={ circle, minimum size=2pt, inner sep=0pt, outer sep=0pt, draw=black,fill=black}, ] \node (init) [state] {} child {node (s1) {$\vdots$}} child {node (s2) [state] {} child {node (s4) [state] {} child {node (s6) [state] {}} child {node (s7) [state] {}} } child {node (s5) [split] {$\forall$,$\exists$}} } child {node (s3) [state] {}}; \node (start) [right=2cm of s5] {Thread}; \node (end) [below=2.1cm of start] {}; \path [->] (s5) edge (start) (start) edge [decorate,decoration=snake] (end); \end{tikzpicture} \end{document} --- Cheers, Paulo Matos ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ pgf-users mailing list pgf-users@... https://lists.sourceforge.net/lists/listinfo/pgf-users |
|
|
Re: Design questionHi,
Try adding child [edge from parent path={(\tikzparentnode.south) -- (\tikzchildnode.north)},anchor=north] {node (s1) {$\vdots$}} It is a little bit clumsy to throw this in the middle of the picture code, but it can hidden in a style. Hope this helps Mark 2009/10/24 Paulo J. Matos <pocmatos@...>: > Hi, > > I am trying to draw a tree to explain a search procedure, but I do not > want to draw all branches... only the relevant ones. I do want to pass > to the viewer that the branches that I didn't open do continue to be > explored by the procedure. For this I tried to use $\vdots$ as the node > label of the nodes that will keep being explored. This doesn't seem to > good as the vdots don't show exactly beneath the tree branch and doesn't > look too good. I am mainly interested in ideas on the best way to do > this. Any suggestions? > > > --- Here's what I have > \documentclass[11pt]{minimal} > \usepackage{tikz} > \usetikzlibrary{shapes,arrows,trees,matrix,positioning,decorations.pathmorphing,scopes} > \usepackage[T1]{fontenc} > \usepackage[utf8]{inputenc} > \renewcommand{\rmdefault}{ppl} > \usepackage[euler-digits]{eulervm} > \usepackage[scaled]{beramono} > \usepackage{bsymb} > \usepackage[active,tightpage]{preview} > \PreviewEnvironment{tikzpicture} > \setlength\PreviewBorder{1pt}% > > \begin{document} > \begin{tikzpicture}[ > split/.style={ > rectangle, > minimum size=2mm, > solid,thick,draw=black!50, > top color=white, > bottom color=red!50}, > state/.style={ > circle, > minimum size=2pt, > inner sep=0pt, > outer sep=0pt, > draw=black,fill=black}, > ] > \node (init) [state] {} > child {node (s1) {$\vdots$}} > child {node (s2) [state] {} > child {node (s4) [state] {} > child {node (s6) [state] {}} > child {node (s7) [state] {}} > } > child {node (s5) [split] {$\forall$,$\exists$}} > } > child {node (s3) [state] {}}; > > \node (start) [right=2cm of s5] {Thread}; > \node (end) [below=2.1cm of start] {}; > > \path [->] (s5) edge (start) > (start) edge [decorate,decoration=snake] (end); > > \end{tikzpicture} > \end{document} > --- > > Cheers, > > Paulo Matos > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > pgf-users mailing list > pgf-users@... > https://lists.sourceforge.net/lists/listinfo/pgf-users > ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ pgf-users mailing list pgf-users@... https://lists.sourceforge.net/lists/listinfo/pgf-users |
|
|
Re: Design questionHi,
Actually, change that to child [edge from parent path={(\tikzparentnode) -- (\tikzchildnode.north)},anchor=north] {node (s1) {$\vdots$}} otherwise the edge from the parent node looks wrong compared to the others. Mark 2009/10/24 Mark Wibrow <m.wibrow@...>: > Hi, > > Try adding > > child [edge from parent path={(\tikzparentnode.south) -- > (\tikzchildnode.north)},anchor=north] > {node (s1) {$\vdots$}} > > It is a little bit clumsy to throw this in the middle of the picture > code, but it can hidden in a style. > > Hope this helps > > Mark > > > 2009/10/24 Paulo J. Matos <pocmatos@...>: >> Hi, >> >> I am trying to draw a tree to explain a search procedure, but I do not >> want to draw all branches... only the relevant ones. I do want to pass >> to the viewer that the branches that I didn't open do continue to be >> explored by the procedure. For this I tried to use $\vdots$ as the node >> label of the nodes that will keep being explored. This doesn't seem to >> good as the vdots don't show exactly beneath the tree branch and doesn't >> look too good. I am mainly interested in ideas on the best way to do >> this. Any suggestions? >> >> >> --- Here's what I have >> \documentclass[11pt]{minimal} >> \usepackage{tikz} >> \usetikzlibrary{shapes,arrows,trees,matrix,positioning,decorations.pathmorphing,scopes} >> \usepackage[T1]{fontenc} >> \usepackage[utf8]{inputenc} >> \renewcommand{\rmdefault}{ppl} >> \usepackage[euler-digits]{eulervm} >> \usepackage[scaled]{beramono} >> \usepackage{bsymb} >> \usepackage[active,tightpage]{preview} >> \PreviewEnvironment{tikzpicture} >> \setlength\PreviewBorder{1pt}% >> >> \begin{document} >> \begin{tikzpicture}[ >> split/.style={ >> rectangle, >> minimum size=2mm, >> solid,thick,draw=black!50, >> top color=white, >> bottom color=red!50}, >> state/.style={ >> circle, >> minimum size=2pt, >> inner sep=0pt, >> outer sep=0pt, >> draw=black,fill=black}, >> ] >> \node (init) [state] {} >> child {node (s1) {$\vdots$}} >> child {node (s2) [state] {} >> child {node (s4) [state] {} >> child {node (s6) [state] {}} >> child {node (s7) [state] {}} >> } >> child {node (s5) [split] {$\forall$,$\exists$}} >> } >> child {node (s3) [state] {}}; >> >> \node (start) [right=2cm of s5] {Thread}; >> \node (end) [below=2.1cm of start] {}; >> >> \path [->] (s5) edge (start) >> (start) edge [decorate,decoration=snake] (end); >> >> \end{tikzpicture} >> \end{document} >> --- >> >> Cheers, >> >> Paulo Matos >> >> >> ------------------------------------------------------------------------------ >> Come build with us! The BlackBerry(R) Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9 - 12, 2009. Register now! >> http://p.sf.net/sfu/devconference >> _______________________________________________ >> pgf-users mailing list >> pgf-users@... >> https://lists.sourceforge.net/lists/listinfo/pgf-users >> > ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ pgf-users mailing list pgf-users@... https://lists.sourceforge.net/lists/listinfo/pgf-users |
|
|
Re: Design questionOn Sat, 2009-10-24 at 16:51 +0100, Mark Wibrow wrote:
> Hi, > > Actually, change that to > > child [edge from parent path={(\tikzparentnode) -- > (\tikzchildnode.north)},anchor=north] > {node (s1) {$\vdots$}} > The idea behind that is to create a path and put the ... on it, right? > otherwise the edge from the parent node looks wrong compared to the others. > > Mark > > 2009/10/24 Mark Wibrow <m.wibrow@...>: > > Hi, > > > > Try adding > > > > child [edge from parent path={(\tikzparentnode.south) -- > > (\tikzchildnode.north)},anchor=north] > > {node (s1) {$\vdots$}} > > > > It is a little bit clumsy to throw this in the middle of the picture > > code, but it can hidden in a style. > > > > Hope this helps > > > > Mark > > > > > > 2009/10/24 Paulo J. Matos <pocmatos@...>: > >> Hi, > >> > >> I am trying to draw a tree to explain a search procedure, but I do not > >> want to draw all branches... only the relevant ones. I do want to pass > >> to the viewer that the branches that I didn't open do continue to be > >> explored by the procedure. For this I tried to use $\vdots$ as the node > >> label of the nodes that will keep being explored. This doesn't seem to > >> good as the vdots don't show exactly beneath the tree branch and doesn't > >> look too good. I am mainly interested in ideas on the best way to do > >> this. Any suggestions? > >> > >> > >> --- Here's what I have > >> \documentclass[11pt]{minimal} > >> \usepackage{tikz} > >> \usetikzlibrary{shapes,arrows,trees,matrix,positioning,decorations.pathmorphing,scopes} > >> \usepackage[T1]{fontenc} > >> \usepackage[utf8]{inputenc} > >> \renewcommand{\rmdefault}{ppl} > >> \usepackage[euler-digits]{eulervm} > >> \usepackage[scaled]{beramono} > >> \usepackage{bsymb} > >> \usepackage[active,tightpage]{preview} > >> \PreviewEnvironment{tikzpicture} > >> \setlength\PreviewBorder{1pt}% > >> > >> \begin{document} > >> \begin{tikzpicture}[ > >> split/.style={ > >> rectangle, > >> minimum size=2mm, > >> solid,thick,draw=black!50, > >> top color=white, > >> bottom color=red!50}, > >> state/.style={ > >> circle, > >> minimum size=2pt, > >> inner sep=0pt, > >> outer sep=0pt, > >> draw=black,fill=black}, > >> ] > >> \node (init) [state] {} > >> child {node (s1) {$\vdots$}} > >> child {node (s2) [state] {} > >> child {node (s4) [state] {} > >> child {node (s6) [state] {}} > >> child {node (s7) [state] {}} > >> } > >> child {node (s5) [split] {$\forall$,$\exists$}} > >> } > >> child {node (s3) [state] {}}; > >> > >> \node (start) [right=2cm of s5] {Thread}; > >> \node (end) [below=2.1cm of start] {}; > >> > >> \path [->] (s5) edge (start) > >> (start) edge [decorate,decoration=snake] (end); > >> > >> \end{tikzpicture} > >> \end{document} > >> --- > >> > >> Cheers, > >> > >> Paulo Matos > >> > >> > >> ------------------------------------------------------------------------------ > >> Come build with us! The BlackBerry(R) Developer Conference in SF, CA > >> is the only developer event you need to attend this year. Jumpstart your > >> developing skills, take BlackBerry mobile applications to market and stay > >> ahead of the curve. Join us from November 9 - 12, 2009. Register now! > >> http://p.sf.net/sfu/devconference > >> _______________________________________________ > >> pgf-users mailing list > >> pgf-users@... > >> https://lists.sourceforge.net/lists/listinfo/pgf-users > >> > > ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ pgf-users mailing list pgf-users@... https://lists.sourceforge.net/lists/listinfo/pgf-users |
| Free embeddable forum powered by Nabble | Forum Help |