2

I am working on a taxonomy and using \forest to build it. I wants to draw a part highlighted in red color in the attached image.

\documentclass[conference]{IEEEtran}
\usepackage{etex}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{tikz,pgfplots}
\usepackage{tikz-qtree}
\usepackage{forest}
\usepackage{lettrine}
\usepackage{lscape}
\usepackage{pgf-pie}
\usetikzlibrary{positioning,shapes,arrows,shadows,patterns}
\usepackage{dashbox}
\usepackage{mathptmx}
\def\dsp{\def\baselinestretch{1.5}\large\normalsize}
\dsp
\newtheorem{theorem}{Jibberish}
\hyphenation{mar-gin-al-ia}
\begin{document}
\begin{figure}
    \centering
    {\footnotesize
        \begin{forest}
            for tree={
                grow=0,             
                parent anchor=east,
                child anchor=west,
                anchor = west,
                if n children=0{tier=word}{},
                align=center,
                edge path={                     
                    \noexpand\path[\forestoption{edge}](!u.parent anchor) -- +(5pt,0) |- (.child anchor)\forestoption{edge label};
                }                   
            }
            [xxx                        
            [yyy    
            [zzz
            [kkk]
            [lll
            [mmm]
            [mmm]
            ]
            ]               
            ]
            [yyy        
            [zzz
            [kkk
            [aaa]
            [bbb]
            ]
            [lll
            [aaa]
            [bbb]
            [ccc]
            ]
            ]    
            [zzz
            [kkk]
            [lll]
            ]       
            [zzz
            [kkk]   
            [lll]           
            [mmm]       
            ]   
            ]
            ]       
        \end{forest}
    }       
\end{figure}
\end{document}

enter image description here

1

1 Answer 1

1

You could "cheat" and just draw it "by hand".

enter image description here

\documentclass[conference]{IEEEtran}
\usepackage{etex}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{tikz,pgfplots}
\usepackage{tikz-qtree}
\usepackage{forest}
\usepackage{lettrine}
\usepackage{lscape}
\usepackage{pgf-pie}
\usetikzlibrary{positioning,shapes,arrows,shadows,patterns}
\usepackage{dashbox}
\usepackage{mathptmx}
\def\dsp{\def\baselinestretch{1.5}\large\normalsize}
\dsp
\newtheorem{theorem}{Jibberish}
\hyphenation{mar-gin-al-ia}
\begin{document}
\begin{figure}
    \centering
    {\footnotesize
        \begin{forest}
            for tree={
                grow=0,             
                parent anchor=east,
                child anchor=west,
                anchor = west,
                if n children=0{tier=word}{},
                align=center,
                edge path={                     
                    \noexpand\path[\forestoption{edge}](!u.parent anchor) -- +(5pt,0) |- (.child anchor)\forestoption{edge label};
                }                   
            }
            [xxx                        
            [yyy    
            [zzz
            [kkk]
            [lll
            [mmm]
            [mmm]
            ]
            ]               
            ]
            [yyy        
            [zzz
            [kkk
            [aaa] {\draw () -- ++(1,0) coordinate(x1) |- (!s);}
            [bbb] 
            ]
            [lll
            [aaa] {\draw () -- ++(1,0) coordinate(x2) |- (!s);}
            [bbb] 
            [ccc] {\draw () -- ++(1,0) coordinate(x3) |- (!s);
             \draw (x1) -- (x3) coordinate[pos=0.125] (y1)
             coordinate[pos=0.375] (y2)
             coordinate[pos=0.625] (y3)
             coordinate[pos=0.875] (y4);
             \foreach \X [count=\Y] in {sss,rrr,qqq,ppp}
             {\draw (y\Y) -- ++(1,0) node[right] {\X};}}
            ]
            ]    
            [zzz
            [kkk]
            [lll]
            ]       
            [zzz
            [kkk]   
            [lll]           
            [mmm]       
            ]   
            ]
            ]       
        \end{forest}
    }       
\end{figure}
\end{document}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .