# Tikz trees - line feature

In my MWE :

• why line width=0pt doesn't work ?
• why the dashed argument on a level leeks on the next ?

\documentclass[tikz]{standalone}
\usetikzlibrary{trees}

\begin{document}

\begin{tikzpicture}[level distance=5mm,
level 1/.style={sibling distance=32mm,line width=0pt},
level 2/.style={sibling distance=16mm,dashed},
level 3/.style={sibling distance=8mm,level distance=12mm},
%level 4/.style={sibling distance=7mm},
%every fit/.style={rectangle,draw,inner sep=3.5pt},
grow=right]

\scriptsize
\node {$\bullet$}
child {node {P}
child {node{PP}
child {node{PPP}}
child {node{PPF}}
}
child {node{PF}
child {node{PFP}}
child {node{PFF}}
}
}
child {node {F}
child {node{FP}
child {node{FPP}}
child {node{FPF}}
}
child {node{FF}
child {node{FFP}}
child {node{FFF}}
}
} ;
\end{tikzpicture}

\end{document}

-
line width=0pt is invisible. try instead such it definition to use draw=none (effect should be the same). – Zarko Apr 25 '14 at 7:25
@Zarko Doesn't work at all. – Tarass Apr 25 '14 at 7:31
@HarishKumar Maybe you can cheat a png picture ;-) but in pdf with evince viewer, the line is still here. – Tarass Apr 25 '14 at 7:34
@HarishKumar what does it mean ? sorry for my poor english. – Tarass Apr 25 '14 at 7:55
What does 'scrap that' means, I appologize for my poor english, I can't understand what you said. – Tarass Apr 25 '14 at 8:03

You have to change the edge from parent style

\documentclass[tikz,margin=5mm]{standalone}
\usetikzlibrary{trees}

\begin{document}

\begin{tikzpicture}[level distance=5mm,
level 1/.style={sibling distance=32mm,
edge from parent/.style={draw=none}},
level 2/.style={sibling distance=16mm,
edge from parent/.append style={draw,dashed}},
level 3/.style={sibling distance=8mm,level distance=12mm,
edge from parent/.append style={solid}},
%level 4/.style={sibling distance=7mm},
%every fit/.style={rectangle,draw,inner sep=3.5pt},
grow=right]

\scriptsize
\node {$\bullet$}
child {node {P}
child {node{PP}
child {node{PPP}}
child {node{PPF}}
}
child {node{PF}
child {node{PFP}}
child {node{PFF}}
}
}
child {node {F}
child {node{FP}
child {node{FPP}}
child {node{FPF}}
}
child {node{FF}
child {node{FFP}}
child {node{FFF}}
}
} ;
\end{tikzpicture}

\end{document}


-
Is there any way I can apply the edge from parent style only to one level and have all others assume the default? – oarfish Nov 26 '14 at 18:08
If only the second level should be dashed you could use: level/.style={edge from parent/.style={draw,solid}}, and level 2/.style={edge from parent/.append style={dashed}}. – esdd Nov 27 '14 at 9:23
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.6910266280174255, "perplexity": 22183.652051932502}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-26/segments/1466783395039.24/warc/CC-MAIN-20160624154955-00000-ip-10-164-35-72.ec2.internal.warc.gz"}